nRF5 SDK v17.1.0
Modules | Data Structures | Macros | Typedefs | Functions
WDT driver

Watchdog Timer (WDT) peripheral driver. More...

Modules

 WDT peripheral driver configuration
 

Data Structures

struct  nrfx_wdt_config_t
 Struct for WDT initialization. More...
 

Macros

#define NRFX_WDT_IRQ_CONFIG   .interrupt_priority = NRFX_WDT_CONFIG_IRQ_PRIORITY
 WDT instance interrupt priority configuration.
 
#define NRFX_WDT_DEAFULT_CONFIG
 WDT driver default configuration. More...
 

Typedefs

typedef void(* nrfx_wdt_event_handler_t )(void)
 WDT event handler function type.
 
typedef nrf_wdt_rr_register_t nrfx_wdt_channel_id
 WDT channel ID type.
 

Functions

nrfx_err_t nrfx_wdt_init (nrfx_wdt_config_t const *p_config, nrfx_wdt_event_handler_t wdt_event_handler)
 This function initializes the watchdog. More...
 
nrfx_err_t nrfx_wdt_channel_alloc (nrfx_wdt_channel_id *p_channel_id)
 Function for allocating a watchdog channel. More...
 
void nrfx_wdt_enable (void)
 Function for starting the watchdog. More...
 
void nrfx_wdt_feed (void)
 Function for feeding the watchdog. More...
 
void nrfx_wdt_channel_feed (nrfx_wdt_channel_id channel_id)
 Function for feeding an invidual watchdog channel. More...
 
__STATIC_INLINE uint32_t nrfx_wdt_ppi_task_addr (nrf_wdt_task_t task)
 Function for returning a requested task address for the WDT driver module. More...
 
__STATIC_INLINE uint32_t nrfx_wdt_ppi_event_addr (nrf_wdt_event_t event)
 Function for returning a requested event address for the wdt driver module. More...
 

Detailed Description

Watchdog Timer (WDT) peripheral driver.

Macro Definition Documentation

#define NRFX_WDT_DEAFULT_CONFIG
Value:

WDT driver default configuration.

Function Documentation

nrfx_err_t nrfx_wdt_channel_alloc ( nrfx_wdt_channel_id p_channel_id)

Function for allocating a watchdog channel.

Note
This function can not be called after nrfx_wdt_start(void).
Parameters
[out]p_channel_idID of granted channel.
Returns
NRFX_SUCCESS on success, otherwise an error code.
void nrfx_wdt_channel_feed ( nrfx_wdt_channel_id  channel_id)

Function for feeding an invidual watchdog channel.

Parameters
[in]channel_idID of watchdog channel.
void nrfx_wdt_enable ( void  )

Function for starting the watchdog.

Note
After calling this function the watchdog is started, so the user needs to feed all allocated watchdog channels to avoid reset. At least one watchdog channel must be allocated.
void nrfx_wdt_feed ( void  )

Function for feeding the watchdog.

Function feeds all allocated watchdog channels.

nrfx_err_t nrfx_wdt_init ( nrfx_wdt_config_t const *  p_config,
nrfx_wdt_event_handler_t  wdt_event_handler 
)

This function initializes the watchdog.

Parameters
[in]p_configPointer to the structure with the initial configuration.
[in]wdt_event_handlerEvent handler provided by the user. Ignored when NRFX_WDT_CONFIG_NO_IRQ option is enabled.
Returns
NRFX_SUCCESS on success, otherwise an error code.
__STATIC_INLINE uint32_t nrfx_wdt_ppi_event_addr ( nrf_wdt_event_t  event)

Function for returning a requested event address for the wdt driver module.

Parameters
[in]eventOne of the peripheral events.
Returns
Event address.
__STATIC_INLINE uint32_t nrfx_wdt_ppi_task_addr ( nrf_wdt_task_t  task)

Function for returning a requested task address for the WDT driver module.

Parameters
[in]taskOne of the peripheral tasks.
Returns
Task address.

Documentation feedback | Developer Zone | Subscribe | Updated