umar saeed
/
Watchdog_nocoverage_Part2
Lab 6 part 2
Revision 8:b7d0e550de66, committed 2020-03-30
- Comitter:
- ec19664
- Date:
- Mon Mar 30 14:04:32 2020 +0000
- Parent:
- 7:e49685bca7c7
- Commit message:
- Complete
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Mar 11 08:46:57 2020 +0000 +++ b/main.cpp Mon Mar 30 14:04:32 2020 +0000 @@ -48,7 +48,8 @@ evt = signals.wait_any(ON1 | OFF1); // wait for either signal if (evt & ON1) led1 = ON ; if (evt & OFF1) led1 = OFF ; - waitButton() ; // POSSIBLE FAULT HERE + wdt_kickA(); + //waitButton() ; // POSSIBLE FAULT HERE } } @@ -61,7 +62,8 @@ evt = signals.wait_any(ON2 | OFF2); // wait for any signal if (evt & ON2) led2 = ON ; if (evt & OFF2) led2 = OFF ; - // waitButton() ; // POSSIBLE FAULT HERE + wdt_kickB(); + waitButton() ; // POSSIBLE FAULT HERE } } @@ -87,9 +89,9 @@ // ---------------------------------------------- int main(void) { - wdt_32ms() ; // initialise watchdog - 32ms timeout + wdt_1sec() ; // initialise watchdog - 32ms timeout wdt_kick_all() ; - tick.attach_us(callback(&wdt_kick_all), 20000); // ticks every 20ms + //tick.attach_us(callback(&wdt_kick_all), 20000); // ticks every 20ms // start threads threadT.start(timer_thread) ; // start the timer thread