41.2.3 wdt_set_timeout_period
Config the timeout period for WDT HAL instance and hardware.
static int32_t wdt_set_timeout_period(
struct wdt_descriptor *const wdt,
const uint32_t clk_rate,
const uint16_t timeout_period
)
Set the timeout period to WDT instance.
Parameters
- wdt
-
Type: struct wdt_descriptor Struct *const
The pointer to the HAL WDT instance.
- clk_rate
-
Type: const uint32_t
The current clock rate of generic clock(GCLK_WDT) in HZ
- timeout_period
-
Type: const uint16_t
The desired timeout period(ms).
Returns
Type: int32_t
Operation status of init
- 0
-
Completed sucessfully.
- -1
-
Always on or enabled, can't set again.
- -2
-
Invalid timeout period.