Example of watchdog causing a reset
Fork of KL25Z_WATCHDOG_USBSERIAL by
Diff: main.cpp
- Revision:
- 6:cbbe7d3ff485
- Parent:
- 5:c9b52b30a317
--- a/main.cpp Wed Feb 27 11:59:35 2019 +0000 +++ b/main.cpp Wed Mar 11 08:52:19 2020 +0000 @@ -48,19 +48,19 @@ // show start-up led_blue = DARK; led_red = LIGHT; - wait(0.5) ; + ThisThread::sleep_for(500) ; //wait(0.5) ; led_red = DARK; // Note: the red LED now stays OFF until processor reset while(1) { led_blue = LIGHT; - wait(0.25); + ThisThread::sleep_for(250) ; // wait(0.25); if (watchDog == Working) wdt_kick_all() ; led_blue = DARK; - wait(0.25); + ThisThread::sleep_for(250) ; // wait(0.25); - // When the counter rachs zero, chang state to stop watchdog + // When the counter reachs zero, change state to stop watchdog if (counter > 0) counter-- ; else watchDog = Stopped ; } } \ No newline at end of file