Example of watchdog causing a reset
Fork of KL25Z_WATCHDOG_USBSERIAL by
Revision 6:cbbe7d3ff485, committed 2020-03-11
- Comitter:
- WilliamMarshQMUL
- Date:
- Wed Mar 11 08:52:19 2020 +0000
- Parent:
- 5:c9b52b30a317
- Commit message:
- Update mbed library and wait API
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-os.lib | Show annotated file Show diff for this revision Revisions of this file |
diff -r c9b52b30a317 -r cbbe7d3ff485 main.cpp --- 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
diff -r c9b52b30a317 -r cbbe7d3ff485 mbed-os.lib --- a/mbed-os.lib Wed Feb 27 11:59:35 2019 +0000 +++ b/mbed-os.lib Wed Mar 11 08:52:19 2020 +0000 @@ -1,1 +1,1 @@ -https://github.com/armmbed/mbed-os/#51d55508e8400b60af467005646c4e2164738d48 +https://github.com/armmbed/mbed-os/#c12b433026beae5b3b769c27941bc6d7fe5d4b27