Hardware access layer for managing the Watchdog Timer (WDT) peripheral. More...
Macros |
|
| #define | NRF_WDT_CHANNEL_NUMBER 0x8UL |
|
Number of WDT channels.
|
|
| #define | NRF_WDT_RR_VALUE 0x6E524635UL /* Fixed value; should not be modified. */ |
|
WDT register reload value.
|
|
Enumerations |
|
| enum | nrf_wdt_task_t { NRF_WDT_TASK_START = offsetof(NRF_WDT_Type, TASKS_START) } |
|
WDT tasks.
More...
|
|
| enum | nrf_wdt_event_t { NRF_WDT_EVENT_TIMEOUT = offsetof(NRF_WDT_Type, EVENTS_TIMEOUT) } |
|
WDT events.
More...
|
|
| enum |
nrf_wdt_behaviour_t
{
NRF_WDT_BEHAVIOUR_RUN_SLEEP = WDT_CONFIG_SLEEP_Msk, NRF_WDT_BEHAVIOUR_RUN_HALT = WDT_CONFIG_HALT_Msk, NRF_WDT_BEHAVIOUR_RUN_SLEEP_HALT = WDT_CONFIG_SLEEP_Msk | WDT_CONFIG_HALT_Msk, NRF_WDT_BEHAVIOUR_PAUSE_SLEEP_HALT = 0 } |
|
WDT behavior in the SLEEP or HALT CPU modes.
More...
|
|
| enum |
nrf_wdt_rr_register_t
{
NRF_WDT_RR0 = 0, NRF_WDT_RR1 , NRF_WDT_RR2 , NRF_WDT_RR3 , NRF_WDT_RR4 , NRF_WDT_RR5 , NRF_WDT_RR6 , NRF_WDT_RR7 } |
|
WDT reload request registers.
More...
|
|
| enum | nrf_wdt_int_mask_t { NRF_WDT_INT_TIMEOUT_MASK = WDT_INTENSET_TIMEOUT_Msk } |
|
WDT interrupts.
More...
|
|
Functions |
|
| __STATIC_INLINE void | nrf_wdt_behaviour_set ( nrf_wdt_behaviour_t behaviour) |
|
Function for configuring the watchdog behavior when the CPU is sleeping or halted.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_task_trigger ( nrf_wdt_task_t task) |
|
Function for starting the WDT task.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_event_clear ( nrf_wdt_event_t event) |
|
Function for clearing the WDT event register.
More...
|
|
| __STATIC_INLINE bool | nrf_wdt_event_check ( nrf_wdt_event_t event) |
|
Function for retrieving the state of the WDT event.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_int_enable (uint32_t int_mask) |
|
Function for enabling the specified interrupt.
More...
|
|
| __STATIC_INLINE bool | nrf_wdt_int_enable_check (uint32_t int_mask) |
|
Function for retrieving the state of given interrupt.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_int_disable (uint32_t int_mask) |
|
Function for disabling a specific interrupt.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_subscribe_set ( nrf_wdt_task_t task, uint8_t channel) |
|
Function for setting the subscribe configuration for a given WDT task.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_subscribe_clear ( nrf_wdt_task_t task) |
|
Function for clearing the subscribe configuration for a given WDT task.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_publish_set ( nrf_wdt_event_t event, uint8_t channel) |
|
Function for setting the publish configuration for a given WDT event.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_publish_clear ( nrf_wdt_event_t event) |
|
Function for clearing the publish configuration for a given WDT event.
More...
|
|
| __STATIC_INLINE uint32_t | nrf_wdt_task_address_get ( nrf_wdt_task_t task) |
|
Function for returning the address of a specific WDT task register.
More...
|
|
| __STATIC_INLINE uint32_t | nrf_wdt_event_address_get ( nrf_wdt_event_t event) |
|
Function for returning the address of a specific WDT event register.
More...
|
|
| __STATIC_INLINE bool | nrf_wdt_started (void) |
|
Function for retrieving the watchdog status.
More...
|
|
| __STATIC_INLINE bool | nrf_wdt_request_status ( nrf_wdt_rr_register_t rr_register) |
|
Function for retrieving the watchdog reload request status.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_reload_value_set (uint32_t reload_value) |
|
Function for setting the watchdog reload value.
More...
|
|
| __STATIC_INLINE uint32_t | nrf_wdt_reload_value_get (void) |
|
Function for retrieving the watchdog reload value.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_reload_request_enable ( nrf_wdt_rr_register_t rr_register) |
|
Function for enabling a specific reload request register.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_reload_request_disable ( nrf_wdt_rr_register_t rr_register) |
|
Function for disabling a specific reload request register.
More...
|
|
| __STATIC_INLINE bool | nrf_wdt_reload_request_is_enabled ( nrf_wdt_rr_register_t rr_register) |
|
Function for retrieving the status of a specific reload request register.
More...
|
|
| __STATIC_INLINE void | nrf_wdt_reload_request_set ( nrf_wdt_rr_register_t rr_register) |
|
Function for setting a specific reload request register.
More...
|
|
Detailed Description
Hardware access layer for managing the Watchdog Timer (WDT) peripheral.
Enumeration Type Documentation
| enum nrf_wdt_behaviour_t |
WDT behavior in the SLEEP or HALT CPU modes.
| enum nrf_wdt_event_t |
| enum nrf_wdt_int_mask_t |
WDT reload request registers.
| enum nrf_wdt_task_t |
Function Documentation
| __STATIC_INLINE void nrf_wdt_behaviour_set | ( | nrf_wdt_behaviour_t | behaviour | ) |
Function for configuring the watchdog behavior when the CPU is sleeping or halted.
- Parameters
-
behaviour Watchdog behavior when CPU is in SLEEP or HALT mode.
| __STATIC_INLINE uint32_t nrf_wdt_event_address_get | ( | nrf_wdt_event_t | event | ) |
Function for returning the address of a specific WDT event register.
- Parameters
-
[in] event Event.
- Returns
- Address of requested event register
| __STATIC_INLINE bool nrf_wdt_event_check | ( | nrf_wdt_event_t | event | ) |
Function for retrieving the state of the WDT event.
- Parameters
-
[in] event Event to be checked.
- Return values
-
true The event has been generated. false The event has not been generated.
| __STATIC_INLINE void nrf_wdt_event_clear | ( | nrf_wdt_event_t | event | ) |
Function for clearing the WDT event register.
- Parameters
-
[in] event Event.
| __STATIC_INLINE void nrf_wdt_int_disable | ( | uint32_t | int_mask | ) |
Function for disabling a specific interrupt.
- Parameters
-
[in] int_mask Interrupt.
| __STATIC_INLINE void nrf_wdt_int_enable | ( | uint32_t | int_mask | ) |
Function for enabling the specified interrupt.
- Parameters
-
[in] int_mask Interrupt.
| __STATIC_INLINE bool nrf_wdt_int_enable_check | ( | uint32_t | int_mask | ) |
Function for retrieving the state of given interrupt.
- Parameters
-
[in] int_mask Interrupt.
- Return values
-
true Interrupt is enabled. false Interrupt is not enabled.
| __STATIC_INLINE void nrf_wdt_publish_clear | ( | nrf_wdt_event_t | event | ) |
Function for clearing the publish configuration for a given WDT event.
- Parameters
-
[in] event Event for which to clear the configuration.
| __STATIC_INLINE void nrf_wdt_publish_set | ( | nrf_wdt_event_t | event , |
| uint8_t | channel | ||
| ) |
Function for setting the publish configuration for a given WDT event.
- Parameters
-
[in] event Event for which to set the configuration. [in] channel Channel through which to publish the event.
| __STATIC_INLINE void nrf_wdt_reload_request_disable | ( | nrf_wdt_rr_register_t | rr_register | ) |
Function for disabling a specific reload request register.
- Parameters
-
[in] rr_register Reload request register to be disabled.
| __STATIC_INLINE void nrf_wdt_reload_request_enable | ( | nrf_wdt_rr_register_t | rr_register | ) |
Function for enabling a specific reload request register.
- Parameters
-
[in] rr_register Reload request register to be enabled.
| __STATIC_INLINE bool nrf_wdt_reload_request_is_enabled | ( | nrf_wdt_rr_register_t | rr_register | ) |
Function for retrieving the status of a specific reload request register.
- Parameters
-
[in] rr_register Reload request register to be checked.
- Return values
-
true The reload request register is enabled. false The reload request register is not enabled.
| __STATIC_INLINE void nrf_wdt_reload_request_set | ( | nrf_wdt_rr_register_t | rr_register | ) |
Function for setting a specific reload request register.
- Parameters
-
[in] rr_register Reload request register to set.
| __STATIC_INLINE uint32_t nrf_wdt_reload_value_get | ( | void | ) |
Function for retrieving the watchdog reload value.
- Returns
- Reload value.
| __STATIC_INLINE void nrf_wdt_reload_value_set | ( | uint32_t | reload_value | ) |
Function for setting the watchdog reload value.
- Parameters
-
[in] reload_value Watchdog counter initial value.
| __STATIC_INLINE bool nrf_wdt_request_status | ( | nrf_wdt_rr_register_t | rr_register | ) |
Function for retrieving the watchdog reload request status.
- Parameters
-
[in] rr_register Reload request register to be checked.
- Return values
-
true Reload request is running. false No reload requests are running.
| __STATIC_INLINE bool nrf_wdt_started | ( | void | ) |
Function for retrieving the watchdog status.
- Return values
-
true The watchdog is started. false The watchdog is not started.
| __STATIC_INLINE void nrf_wdt_subscribe_clear | ( | nrf_wdt_task_t | task | ) |
Function for clearing the subscribe configuration for a given WDT task.
- Parameters
-
[in] task Task for which to clear the configuration.
| __STATIC_INLINE void nrf_wdt_subscribe_set | ( | nrf_wdt_task_t | task , |
| uint8_t | channel | ||
| ) |
Function for setting the subscribe configuration for a given WDT task.
- Parameters
-
[in] task Task for which to set the configuration. [in] channel Channel through which to subscribe events.
| __STATIC_INLINE uint32_t nrf_wdt_task_address_get | ( | nrf_wdt_task_t | task | ) |
Function for returning the address of a specific WDT task register.
- Parameters
-
[in] task Task.
| __STATIC_INLINE void nrf_wdt_task_trigger | ( | nrf_wdt_task_t | task | ) |
Function for starting the WDT task.
- Parameters
-
[in] task Task.