nrfx 3.3
Data Structures | Macros | Functions
WDT HALY

Hardware access layer with cache and barrier support for managing the WDT peripheral. More...

Data Structures

struct  nrfy_wdt_config_t
 WDT configuration structure. More...
 

Macros

#define NRFY_WDT_HAS_STOP   1
 

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.
 
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.
 
NRFY_STATIC_INLINE void nrfy_wdt_int_uninit (NRF_WDT_Type *p_reg)
 Function for uninitializing the WDT interrupts.
 
NRFY_STATIC_INLINE uint32_t nrfy_wdt_events_process (NRF_WDT_Type *p_reg, uint32_t mask)
 Function for processing the specified WDT events.
 
NRFY_STATIC_INLINE void nrfy_wdt_task_trigger (NRF_WDT_Type *p_reg, nrf_wdt_task_t task)
 
NRFY_STATIC_INLINE uint32_t nrfy_wdt_task_address_get (NRF_WDT_Type const *p_reg, nrf_wdt_task_t task)
 
NRFY_STATIC_INLINE void nrfy_wdt_event_clear (NRF_WDT_Type *p_reg, nrf_wdt_event_t event)
 
NRFY_STATIC_INLINE bool nrfy_wdt_event_check (NRF_WDT_Type const *p_reg, nrf_wdt_event_t event)
 
NRFY_STATIC_INLINE uint32_t nrfy_wdt_event_address_get (NRF_WDT_Type const *p_reg, nrf_wdt_event_t event)
 
NRFY_STATIC_INLINE void nrfy_wdt_int_enable (NRF_WDT_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE uint32_t nrfy_wdt_int_enable_check (NRF_WDT_Type const *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_wdt_int_disable (NRF_WDT_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE void nrfy_wdt_subscribe_set (NRF_WDT_Type *p_reg, nrf_wdt_task_t task, uint8_t channel)
 
NRFY_STATIC_INLINE void nrfy_wdt_subscribe_clear (NRF_WDT_Type *p_reg, nrf_wdt_task_t task)
 
NRFY_STATIC_INLINE void nrfy_wdt_publish_set (NRF_WDT_Type *p_reg, nrf_wdt_event_t event, uint8_t channel)
 
NRFY_STATIC_INLINE void nrfy_wdt_publish_clear (NRF_WDT_Type *p_reg, nrf_wdt_event_t event)
 
NRFY_STATIC_INLINE void nrfy_wdt_behaviour_set (NRF_WDT_Type *p_reg, uint32_t mask)
 
NRFY_STATIC_INLINE bool nrfy_wdt_started_check (NRF_WDT_Type const *p_reg)
 
NRFY_STATIC_INLINE bool nrfy_wdt_request_status_check (NRF_WDT_Type const *p_reg, nrf_wdt_rr_register_t rr_register)
 
NRFY_STATIC_INLINE uint32_t nrfy_wdt_request_status_get (NRF_WDT_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_wdt_reload_value_set (NRF_WDT_Type *p_reg, uint32_t reload_value)
 
NRFY_STATIC_INLINE uint32_t nrfy_wdt_reload_value_get (NRF_WDT_Type const *p_reg)
 
NRFY_STATIC_INLINE void nrfy_wdt_reload_request_enable (NRF_WDT_Type *p_reg, nrf_wdt_rr_register_t rr_register)
 
NRFY_STATIC_INLINE void nrfy_wdt_reload_request_disable (NRF_WDT_Type *p_reg, nrf_wdt_rr_register_t rr_register)
 
NRFY_STATIC_INLINE bool nrfy_wdt_reload_request_enable_check (NRF_WDT_Type const *p_reg, nrf_wdt_rr_register_t rr_register)
 
NRFY_STATIC_INLINE void nrfy_wdt_reload_request_set (NRF_WDT_Type *p_reg, nrf_wdt_rr_register_t rr_register)
 
NRFY_STATIC_INLINE void nrfy_wdt_task_stop_enable_set (NRF_WDT_Type *p_reg, bool enable)
 

Detailed Description

Hardware access layer with cache and barrier support for managing the WDT peripheral.

Macro Definition Documentation

◆ NRFY_WDT_HAS_STOP

#define NRFY_WDT_HAS_STOP   1
See also
NRF_WDT_HAS_STOP Presence of Task STOP functionality.

Function Documentation

◆ nrfy_wdt_behaviour_set()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskWatchdog behaviour mask, created using nrf_wdt_behaviour_mask_t.

◆ nrfy_wdt_event_address_get()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent.
Returns
Address of requested event register.

◆ nrfy_wdt_event_check()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrfy_wdt_event_clear()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent.

◆ nrfy_wdt_events_process()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask 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_wdt_int_disable()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled. Use nrf_wdt_int_mask_t values for bit masking.

◆ nrfy_wdt_int_enable()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled. Use nrf_wdt_int_mask_t values for bit masking.

◆ nrfy_wdt_int_enable_check()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_wdt_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrfy_wdt_int_init()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be initialized.
[in]irq_priorityInterrupt priority.
[in]enableTrue if interrupts are to be enabled, false otherwise.

◆ nrfy_wdt_int_uninit()

NRFY_STATIC_INLINE void nrfy_wdt_int_uninit ( NRF_WDT_Type *  p_reg)

Function for uninitializing the WDT interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_wdt_periph_configure()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the peripheral configuration structure.

◆ nrfy_wdt_publish_clear()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to clear the configuration.

◆ nrfy_wdt_publish_set()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to set the configuration.
[in]channelChannel through which to publish the event.

◆ nrfy_wdt_reload_request_disable()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]rr_registerReload request register to be disabled.

◆ nrfy_wdt_reload_request_enable()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]rr_registerReload request register to be enabled.

◆ nrfy_wdt_reload_request_enable_check()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]rr_registerReload request register to be checked.
Return values
trueThe reload request register is enabled.
falseThe reload request register is not enabled.

◆ nrfy_wdt_reload_request_set()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]rr_registerReload request register to set.

◆ nrfy_wdt_reload_value_get()

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
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Reload value.

◆ nrfy_wdt_reload_value_set()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]reload_valueWatchdog counter initial value.

◆ nrfy_wdt_request_status_check()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]rr_registerReload request register to be checked.
Return values
trueReload request is running.
falseNo reload requests are running.

◆ nrfy_wdt_request_status_get()

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
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Running reload requests mask, constructed with nrf_wdt_rr_register_mask_t.

◆ nrfy_wdt_started_check()

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
[in]p_regPointer to the structure of registers of the peripheral.
Return values
trueThe watchdog is started.
falseThe watchdog is not started.

◆ nrfy_wdt_subscribe_clear()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to clear the configuration.

◆ nrfy_wdt_subscribe_set()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to set the configuration.
[in]channelChannel through which to subscribe events.

◆ nrfy_wdt_task_address_get()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask.
Returns
Address of requested task register.

◆ nrfy_wdt_task_stop_enable_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
[in]p_regPointer to the structure of registers of the peripheral.
[in]enableTrue if stopping is to be enabled, false otherwise.

◆ nrfy_wdt_task_trigger()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask.

Documentation feedback | Developer Zone | Subscribe | Updated