Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Telliskivi2_2014 mbed-IBooth-ETH TwitterReader
Watchdog Class Reference
Routines to set and kick the Watchdog timer for the K64F. More...
#include <Watchdog.h>
| Public Member Functions | |
| void | kick (int WDTseconds) | 
| Create a Watchdog object and initialize timeout in seconds. | |
| void | kick () | 
| Keep alive by kicking the Watchdog occasionally. | |
Detailed Description
Routines to set and kick the Watchdog timer for the K64F.
User inputs a value from 1 to 356 seconds when initializing the Watchdog timer. The user's input number is multiplied by a fixed value and then placed into the countdown timer.
The user is responsible for "kicking" the Watchdog before the timeout interval expires, otherwise the K64F will automatically reboot.
#include "mbed.h" #include "Watchdog.h" Watchdog wdt; int main() { //initialization code.... wdt.kick(20); //init the watchdog for a 20 second timeout while(1) { wait_ms(1000); //do some code wdt.kick(); //kick the watchdog before 20 seconds is up } }
Definition at line 34 of file Watchdog.h.
Member Function Documentation
| void kick | ( | int | WDTseconds ) | 
Create a Watchdog object and initialize timeout in seconds.
- Parameters:
- 
  int timeout in seconds. Range (1 - 356) 
Note: if value out of range, default value with be 356
- Returns:
- NONE
Definition at line 6 of file Watchdog.cpp.
| void kick | ( | ) | 
Keep alive by kicking the Watchdog occasionally.
- Parameters:
- 
  NONE 
- Returns:
- NONE
Definition at line 17 of file Watchdog.cpp.
Generated on Wed Jul 13 2022 01:14:15 by
 1.7.2
 1.7.2