📄 abstract.txt
字号:
C16x Watchdog timer Program Example
===================================
The following example program shows you how to use the watchdog
timer on the C16x family.
To enable the watchdog timer, the startup code must be modified.
By default, the startup code disables the watchdog timer so that
users new to the C16x aren't required to handle watchdog resets.
To enable the watchdog, look for the following section in the
startup code (START167.A66) and set WATCHDOG to 1.
//WATCHDOG: Disable Hardware Watchdog
//--- Set WATCHDOG = 1 to enable the Hardware watchdog
$SET (WATCHDOG = 1);
The C program configures the watchdog timer in divide by 2 mode
and sets the reload value to 128 (0x80). The _srvwdt_ function
executes the srvwdt instruction which services the watchdog.
The C program (after a while) stops servicing the watchdog timer
and the program resets. A breakpoint is set on the reset vector
to output "Watchdog Reset" and halt execution in the event of a
watchdog timer reset. Refer to DEBUG.INI for the breakpoint and
function that check the watchdog status.
You may open the watchdog timer dialog from the peripherals menu
to view the status of the watchdog.
To run this example program:
1. Start the debugger.
2. Run the program.
3. Watch the Command Window for the "Watchdog Reset" message.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -