User`s manual
RX62N Group, RX621 Group 4. Library Reference
4.2.18. Watchdog Timer
1) R_WDT_Create
Synopsis
Configure the Watchdog timer.
Prototype
bool R_WDT_Create(
uint16_t data1,
// Configuration selection
void * func,
// Callback function
uint8_t data2
// Interrupt priority level
);
Description
Set up and start the Watchdog timer.
[data1]
Configure the timer. To set multiple options at the same time, use "|" to separate each value.
The default settings are shown in bold.
•
Clock selection
PDL_WDT_PCLK_DIV_4 or
PDL_WDT_PCLK_DIV_64 or
PDL_WDT_PCLK_DIV_128 or
PDL_WDT_PCLK_DIV_512 or
PDL_WDT_PCLK_DIV_2048 or
PDL_WDT_PCLK_DIV_8192 or
PDL_WDT_PCLK_DIV_32768 or
PDL_WDT_PCLK_DIV_131072
The division ratio for the internal clock signal PCLK.
•
MCU reset control
PDL_WDT_RESET_DISABLE or
PDL_WDT_RESET_ENABLE
Disable or enable reset of the MCU when the watchdog
timer overflows with no callback function specified.
[func]
The function to be called at the periodic interval.
Specify PDL_NO_FUNC to have the timer output a WDTOVF# signal.
The MCU will also be reset (if selected above).
[data2]
The interrupt priority level. Select between 1 (lowest priority) and 15 (highest priority).
This parameter will be ignored if PDL_NO_FUNC is specified for parameter func.
Return value
True if all parameters are valid and exclusive; otherwise false.
Category
Watchdog Timer
Reference
R20UT0084EE0112 Rev.1.12 Page 4-162
July. 16, 2014