Purpose
This example demonstrates how to use the reset cause interface.
Requirements
This example can be used with SAM4L boards.
Description
The program turns LED0 on when the power-on reset happens and outputs different informaiton on the terminal, depending on the reset cause.
Type different commands to generate different reset. To generate Core BOD reset or I/O BOD reset, press reset button after typing 'c' or 'i'.
Usage
- Build the program and download it to the board.
- On the computer, open and configure a terminal application (e.g., HyperTerminal on Microsoft Windows) with these settings:
- 115200 bauds
- 8 bits of data
- No parity
- 1 stop bit
- No flow control
- Start the application.
- In the terminal window, the following text should appear:
-- Reset_Cause Example xxx --
-- xxxxxx-xx
-- Compiled: xxx xx xxxx xx:xx:xx --
- Choose the item in the following menu to test.
Menu :
------Please select reset cause way--------
c: Generate core BOD reset
i: Generate I/O BOD reset
w: Generate watchdog reset
s: Generate system reset