Overview
The WDOG Example project is a demonstration program that uses the KSDK software to show a simple application that enables watchdog, then continuously refreshes the watchdog to prevent CPU reset. Upon SW button push, the watchdog will expire after approximately 2 seconds and chip will reset.
- Combine refresh and reset operation on WDOG timer
- Use a SW to start WDOG. When SW is pressed, WDOG begins to expire.
- Use a LED to indicate reset process. At first, LED is turned on, when SW is pressed, LED start blinking and after resetting LED is turned off. And then, LED is turned on after reset is success.
Supported Platforms
These Freescale Freedom development platforms and Tower System modules are supported by the WDOG example.
- FRDM-K22F
- FRDM-K64F
- FRDM-KW24
- TWR-K21D50M
- TWR-K21F120M
- TWR-K22F120M
- TWR-K24F120M
- TWR-K60D100M
- TWR-K64F120M
- TWR-K65F180M
- TWR-KV10Z32
- TWR-KV31F120M
- TWR-KV46F150M
- TWR-KW24D512
System Requirement
Hardware requirements
- J-Link ARM
- P&E Micro Multi-link universal
- Mini/micro USB cable
- USB A to micro AB cable
- Hardware (tower/base board, ...) for specific device
- Personal Computer
Toolchain requirements
- IAR embedded Workbench version 7.30.4
- ARM GCC 4.8.3 2014q3
- Keil MDK 5.13
- Kinetis Design Studio IDE v.2.5.0
- Atollic TrueSTUDIO for ARM win32 v5.2.1
Software requirements
- The project files are in: <SDK_Install>/examples/<board>/driver_examples/wdog/<toolchain>.
- Library dependencies: ksdk_platform_lib
Getting Started
Hardware settings
The WDOG Example project does not call for any special hardware configurations. Although not required, the recommendation is to leave the development board's jumper settings and configurations in default state when running this example.
Prepare the example
- Connect a USB cable between the PC host and the OpenSDA USB port on the board.
- Open a serial terminal with these settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
- Download the program to the target board.
- Either press the reset button on your board or launch the debugger in your IDE to begin running the example.
Run the example
These instructions are displayed/shown on the terminal window:
WDOG example
Press SW1 to expire watchdog
WDOG reset count 1
Press SW1 to expire watchdog
WDOG reset count 2
Press SW1 to expire watchdog
After that, user need press the SW (*) button on board and observe a LED toggle for showing that the watchdog is about to expire.