4.1.13.3.3 DIAG_WDT_SimpleTimer()
void DIAG_WDT_SimpleTimer (void )
WATCHDOG_SIMPLE_TIMER_TEST is a functional test based on Defintition H.2.16.5 in the IEC-60370.
WDT issues a system reset after timeout.
WDT timing and that it can be cleared.
Power-on or external reset has occurred.
Check that WDT can issue a system reset. Set test state to simple timer and system reset.
Check that WDT can be cleared.
Set test state "ok" and continue to main().
Timer0 (TMR0) is used as an independent clock source to the WDT clock, which is used to check the timing of the oscillator used by the WDT. If the device and WDT was reset correctly in each step of the test, then the diag_wdt_simple_teststate is set to DIAG_WDT_SIMPLE_FSM_OK and diag_simple_wdt_status is set to DIAG_WDT_SIMPLE_PASS, otherwise the diag_wdt_simple_teststate is set to DIAG_WDT_SIMPLE_FAULT and diag_simple_wdt_status is set to DIAG_WDT_SIMPLE_FAIL thereby indicating fault.
Error reporting: DIAG_WDT_SimpleTimer_GetStatus() should be called from main to know the status of Simple Timer WDT diagnosis
|