Example Program To Clear The Mcwdt; Mcwdt Fault Handling; Use Case - Infineon XMC7000 Series Using Manual

Using the watchdog timer
Hide thumbs Also See for XMC7000 Series:
Table of Contents

Advertisement

Using the Watchdog Timer in XMC7000 family MCUs
Multi-counter WDT
3.8.3

Example program to clear the MCWDT

Code Listing 3
shows an example program to clear the MCWDT.
Code Listing 3
Example program to clear the MCWDT
int main(void)
{
:
for(;;)
{
Cy_MCWDT_Unlock(MCWDT_0_HW);
Cy_MCWDT_ResetCounters(MCWDT_0_HW, CY_MCWDT_CTR0, 0u);
Cy_MCWDT_Lock(MCWDT_0_HW);
}
}
3.9

MCWDT fault handling

The four faults are combined into a single fault report. This report includes the data of which fault is triggered,
so the fault handler can record the correct fault cause. Different MCWDT instances have independent fault
reports, so they can be handled by different processors.
The initialization of fault reporting is shown in
used.
For details of the fault setting procedure, see the "Fault Report Structure" section in AN234226 listed in
documents.
The fault is handled within a FAULT report handler. The MCWDT provides the following four FAULT sources:
Lower limit Fault Subcounter 0
Upper limit Fault Subcounter 0
Lower limit Fault Subcounter 1
Upper limit Fault Subcounter 1
The Fault status can be read from the related Fault structure.
3.9.1

Use case

This section describes an example of the MCWDT fault handling using the use case discussed in
Application Note
Figure 10
and
Code Listing
24 of 33
2. As an example, Fault structure 1 is
3.7.1
002-33887 Rev. *A
Related
Use case.
2022-05-25

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xmc7100 seriesXmc7200 series

Table of Contents