Overview
The COP Example project is a demonstration program that uses the KSDK software to enable Watchdog and continuously refreshes the Watchdog to prevent the CPU reset. After pushing the software button, the Watchdog expires after approximately 1 seconds and the chip is reset.
- Combine refresh and reset operation on the WDOG timer.
- Use a SW to start the COP. After pressing the software button, the COP starts to expire.
- Use an LED to indicate the reset process. First, the LED is turned off when the software button is pressed, the LED starts blinking. After reset, the LED is turned off. (**When running this example, we need enable watchdog)
Supported Platforms
These Freescale Freedom development platforms and Tower System modules are supported by the COP example.
- FRDM-KL03Z
- FRDM-KL26Z
- FRDM-KL27Z
- FRDM-KL43Z
- FRDM-KL46Z
- TWR-KL43Z48M
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/cop/<toolchain>.
- Library dependencies: ksdk_platform_lib
Getting Started
Hardware settings
The COP 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:
COP example begin.
Press SW to begin expiring COP
Press the SW (*) button on the board and the board receives and refreshes the reset operation on COP WDOG timer. These instructions are displayed/shown on the terminal window:
Press SW to begin expiring COP
Board will reset after 1 seconds.
COP reset the chip successfully