[RSL10 - Knowledge Base]
The RSL10 has an internal timer called the Watchdog Timer, intended to behave as a safety measure that resets the entire device if part of the firmware execution has malfunctioned. This timer must be periodically acknowledged by the code being executed, otherwise the RSL10 will assume something has gone wrong and will hard-reset the device to fix the problem.
What interactions are offered by the RLS10 to configure the Watchdog Timer, and how is its functionality affected by each of these changes?
By default, the Watchdog timer is enabled within the hardware registers and will have a default period of 4.194 seconds (the longest period allowed by the hardware). This value is configurable by writing to the
TIMEOUT_VALUE within the
WATCHDOG_CFG register directly, or by using the
Sys_Watchdog_Set_Timeout() function. The image below outlines the values that are available.
The system reset will not occur on the first timeout of the Watchdog. Instead, an internal interrupt (WATCHDOG_IRQn) is triggered, to act as a warning that the first Watchdog period has elapsed without a refresh occurring. If, following the first Watchdog timeout, a second period passes and no refresh has occurred, the RSL10 device will assume something has went wrong and will reset itself to resume normal system functionality.
To prevent this reset from occurring, the
WATCHDOG_REFRESH register within
WATCHDOG_CTRL must have the specific 32-bit key written to it, or the firmware running must execute the
Sys_Watchdog_Refresh() function available within the RSL10 libraries.
Sys_Watchdog_Refresh() is called by all of the RSL10 sample applications within the
while(1) loop, to ensure that the timer is always refreshed unless a fault has occurred and has halted the firmware execution. If a different code structure is used for a custom project, or if another trapping
while() loop is executed within
main(), it is up to the developer to call the
Sys_Watchdog_Refresh() function as they see fit.
If you would like to disable this Watchdog safety system during development or testing processes, it can be done by writing the
DEBUG_HALT_CTRL_C_DEBUGEN bit within the