ModusToolbox Safety Test Library
Loading...
Searching...
No Matches

General Description

Functions

uint8_t SelfTest_Windowed_WDT (void)
 This function checks the WDT in Window mode.
uint8_t SelfTest_Windowed_MCWDT (MCWDT_STRUCT_Type *base, cy_en_mcwdtctr_t counter)
 Verifies the windowed WDT behaviour of the specified MCWDT sub-counter.

Function Documentation

◆ SelfTest_Windowed_WDT()

uint8_t SelfTest_Windowed_WDT ( void )

This function checks the WDT in Window mode.

It:
1) Services the WDT before the LOWER limit, which causes the device to reset.
2) Checks the occurance of interrupt at WARN LIMIT.

Note
Applicable only for XMC7000 and XMC5000 devices. This test reconfigures the WDT window, warning interrupt, and reset action. Do not call it while the application relies on the same WDT configuration for normal supervision unless the application can tolerate the temporary watchdog setup and the intentional reset path.
Returns
OK_STATUS (0) - Test passed
ERROR_STATUS (1) - Test failed

◆ SelfTest_Windowed_MCWDT()

uint8_t SelfTest_Windowed_MCWDT ( MCWDT_STRUCT_Type * base,
cy_en_mcwdtctr_t counter )

Verifies the windowed WDT behaviour of the specified MCWDT sub-counter.

It:
1) Services the MCWDT before the lower limit, which causes the device to reset (SWWDTx).
2) After the reset, verifies that the match interrupt fires at the configured match limit.

Parameters
basePointer to the MCWDT block base address (e.g. MCWDT_STRUCT0).
counterSub-counter to test. Valid values: CY_MCWDT_COUNTER0, CY_MCWDT_COUNTER1.
Note
Applicable for PSOC Control Device Family. Only CY_MCWDT_COUNTER0 and CY_MCWDT_COUNTER1 support the lower-limit windowed mode. This test reconfigures the selected MCWDT sub-counter, its lower-limit reset behavior, and its interrupt routing. Do not share the selected sub-counter with application watchdog supervision during the test.
Returns
OK_STATUS (0) - Test passed
ERROR_STATUS (1) - Test failed
MTB_STL_ERROR_TIMEOUT (10) - Counter stall detected (clock not running)