wdg
Dependencies: Watchdog mbed-stm32l0/l1-src
main.cpp
- Committer:
- lzbpli
- Date:
- 2016-04-29
- Revision:
- 0:ac1835f6cf90
File content as of revision 0:ac1835f6cf90:
#include "Watchdog.h" Watchdog wd; Serial pc(PB_6,PB_7); DigitalOut myled(PB_3); //... int main() { pc.baud(115200); pc.printf("hello\r\n"); if (wd.WatchdogCausedReset()) pc.printf("Watchdog caused reset.\r\n"); pc.printf("hello!!\r\n"); wd.Configure(3.0); // sets the timeout interval for (;;) { wd.Service(); // kick the dog before the timeout // do other work pc.printf("hello!!!!\r\n"); wait(1); } }