WDT HALY
- group nrfy_wdt
Hardware access layer with cache and barrier support for managing the WDT peripheral.
Defines
-
NRFY_WDT_HAS_STOP
See also
NRF_WDT_HAS_STOP Presence of Task STOP functionality.
Functions
-
NRFY_STATIC_INLINE void nrfy_wdt_periph_configure(NRF_WDT_Type *p_reg, nrfy_wdt_config_t const *p_config)
Function for configuring the WDT.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_config – [in] Pointer to the peripheral configuration structure.
-
NRFY_STATIC_INLINE void nrfy_wdt_int_init(NRF_WDT_Type *p_reg, uint32_t mask, uint8_t irq_priority, bool enable)
Function for initializing the specified WDT interrupts.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be initialized.
irq_priority – [in] Interrupt priority.
enable – [in] True if interrupts are to be enabled, false otherwise.
-
NRFY_STATIC_INLINE void nrfy_wdt_int_uninit(NRF_WDT_Type *p_reg)
Function for uninitializing the WDT interrupts.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
-
NRFY_STATIC_INLINE uint32_t nrfy_wdt_events_process(NRF_WDT_Type *p_reg, uint32_t mask)
Function for processing the specified WDT events.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK.
- Returns:
Mask of events that were generated and processed. To be checked against the result of NRFY_EVENT_TO_INT_BITMASK().
-
NRFY_STATIC_INLINE void nrfy_wdt_task_trigger(NRF_WDT_Type *p_reg, nrf_wdt_task_t task)
See also
nrf_wdt_task_trigger Function for starting the WDT task.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
task – [in] Task.
-
NRFY_STATIC_INLINE uint32_t nrfy_wdt_task_address_get(NRF_WDT_Type const *p_reg, nrf_wdt_task_t task)
See also
nrf_wdt_task_address_get Function for returning the address of a specific WDT task register.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
task – [in] Task.
- Returns:
Address of requested task register.
-
NRFY_STATIC_INLINE void nrfy_wdt_event_clear(NRF_WDT_Type *p_reg, nrf_wdt_event_t event)
See also
nrf_wdt_event_clear Function for clearing the WDT event register.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event.
-
NRFY_STATIC_INLINE bool nrfy_wdt_event_check(NRF_WDT_Type const *p_reg, nrf_wdt_event_t event)
See also
nrf_wdt_event_check Function for retrieving the state of the WDT event.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event to be checked.
- Return values:
true – The event has been generated.
false – The event has not been generated.
-
NRFY_STATIC_INLINE uint32_t nrfy_wdt_event_address_get(NRF_WDT_Type const *p_reg, nrf_wdt_event_t event)
See also
nrf_wdt_event_address_get Function for returning the address of a specific WDT event register.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event.
- Returns:
Address of requested event register.
-
NRFY_STATIC_INLINE void nrfy_wdt_int_enable(NRF_WDT_Type *p_reg, uint32_t mask)
See also
nrf_wdt_int_enable Function for enabling the specified interrupts.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be enabled. Use nrf_wdt_int_mask_t values for bit masking.
-
NRFY_STATIC_INLINE uint32_t nrfy_wdt_int_enable_check(NRF_WDT_Type const *p_reg, uint32_t mask)
See also
nrf_wdt_int_enable_check Function for checking if the specified interrupts are enabled.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be checked. Use nrf_wdt_int_mask_t values for bit masking.
- Returns:
Mask of enabled interrupts.
-
NRFY_STATIC_INLINE void nrfy_wdt_int_disable(NRF_WDT_Type *p_reg, uint32_t mask)
See also
nrf_wdt_int_disable Function for disabling the specified interrupts.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be disabled. Use nrf_wdt_int_mask_t values for bit masking.
-
NRFY_STATIC_INLINE void nrfy_wdt_subscribe_set(NRF_WDT_Type *p_reg, nrf_wdt_task_t task, uint8_t channel)
See also
nrf_wdt_subscribe_set Function for setting the subscribe configuration for a given WDT task.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
task – [in] Task for which to set the configuration.
channel – [in] Channel through which to subscribe events.
-
NRFY_STATIC_INLINE void nrfy_wdt_subscribe_clear(NRF_WDT_Type *p_reg, nrf_wdt_task_t task)
See also
nrf_wdt_subscribe_clear Function for clearing the subscribe configuration for a given WDT task.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
task – [in] Task for which to clear the configuration.
-
NRFY_STATIC_INLINE void nrfy_wdt_publish_set(NRF_WDT_Type *p_reg, nrf_wdt_event_t event, uint8_t channel)
See also
nrf_wdt_publish_set Function for setting the publish configuration for a given WDT event.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event for which to set the configuration.
channel – [in] Channel through which to publish the event.
-
NRFY_STATIC_INLINE void nrfy_wdt_publish_clear(NRF_WDT_Type *p_reg, nrf_wdt_event_t event)
See also
nrf_wdt_publish_clear Function for clearing the publish configuration for a given WDT event.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
event – [in] Event for which to clear the configuration.
-
NRFY_STATIC_INLINE void nrfy_wdt_behaviour_set(NRF_WDT_Type *p_reg, uint32_t mask)
See also
nrf_wdt_behaviour_set Function for configuring the watchdog behaviour when the CPU is sleeping or halted.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Watchdog behaviour mask, created using nrf_wdt_behaviour_mask_t.
-
NRFY_STATIC_INLINE bool nrfy_wdt_started_check(NRF_WDT_Type const *p_reg)
See also
nrf_wdt_started_check Function for retrieving the watchdog status.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Return values:
true – The watchdog is started.
false – The watchdog is not started.
-
NRFY_STATIC_INLINE bool nrfy_wdt_request_status_check(NRF_WDT_Type const *p_reg, nrf_wdt_rr_register_t rr_register)
See also
nrf_wdt_request_status_check Function for retrieving the watchdog reload request status for specified register.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
rr_register – [in] Reload request register to be checked.
- Return values:
true – Reload request is running.
false – No reload requests are running.
-
NRFY_STATIC_INLINE uint32_t nrfy_wdt_request_status_get(NRF_WDT_Type const *p_reg)
See also
nrf_wdt_request_status_get Function for retrieving the watchdog reload requests status mask.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Running reload requests mask, constructed with nrf_wdt_rr_register_mask_t.
-
NRFY_STATIC_INLINE void nrfy_wdt_reload_value_set(NRF_WDT_Type *p_reg, uint32_t reload_value)
See also
nrf_wdt_reload_value_set Function for setting the watchdog reload value.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
reload_value – [in] Watchdog counter initial value.
-
NRFY_STATIC_INLINE uint32_t nrfy_wdt_reload_value_get(NRF_WDT_Type const *p_reg)
See also
nrf_wdt_reload_value_get Function for retrieving the watchdog reload value.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Reload value.
-
NRFY_STATIC_INLINE void nrfy_wdt_reload_request_enable(NRF_WDT_Type *p_reg, nrf_wdt_rr_register_t rr_register)
See also
nrf_wdt_reload_request_enable Function for enabling a specific reload request register.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
rr_register – [in] Reload request register to be enabled.
-
NRFY_STATIC_INLINE void nrfy_wdt_reload_request_disable(NRF_WDT_Type *p_reg, nrf_wdt_rr_register_t rr_register)
See also
nrf_wdt_reload_request_disable Function for disabling a specific reload request register.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
rr_register – [in] Reload request register to be disabled.
-
NRFY_STATIC_INLINE bool nrfy_wdt_reload_request_enable_check(NRF_WDT_Type const *p_reg, nrf_wdt_rr_register_t rr_register)
See also
nrf_wdt_reload_request_enable_check Function for retrieving the status of a specific reload request register.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
rr_register – [in] Reload request register to be checked.
- Return values:
true – The reload request register is enabled.
false – The reload request register is not enabled.
-
NRFY_STATIC_INLINE void nrfy_wdt_reload_request_set(NRF_WDT_Type *p_reg, nrf_wdt_rr_register_t rr_register)
See also
nrf_wdt_reload_request_set Function for setting a specific reload request register.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
rr_register – [in] Reload request register to set.
-
NRFY_STATIC_INLINE void nrfy_wdt_task_stop_enable_set(NRF_WDT_Type *p_reg, bool enable)
See also
nrf_wdt_task_stop_enable_set Function for enabling or disabling stopping the watchdog.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
enable – [in] True if stopping is to be enabled, false otherwise.
-
struct nrfy_wdt_config_t
- #include <nrfy_wdt.h>
WDT configuration structure.
Public Members
-
uint32_t behaviour
Watchdog behaviour flags bitmask, constructed from nrf_wdt_behaviour_mask_t.
-
uint32_t reload_value
Watchdog counter initial value.
-
uint32_t behaviour
-
NRFY_WDT_HAS_STOP