RA Flexible Software Package Documentation
Release v5.7.0
|
|
Interface for watch dog timer functions.
The WDT interface for the Watchdog Timer (WDT) peripheral provides watchdog functionality including resetting the device or generating an interrupt.
Data Structures | |
struct | wdt_callback_args_t |
struct | wdt_timeout_values_t |
struct | wdt_cfg_t |
struct | wdt_api_t |
struct | wdt_instance_t |
Typedefs | |
typedef void | wdt_ctrl_t |
Enumerations | |
enum | wdt_timeout_t |
enum | wdt_clock_division_t |
enum | wdt_window_start_t |
enum | wdt_window_end_t |
enum | wdt_reset_control_t |
enum | wdt_stop_control_t |
enum | wdt_status_t |
struct wdt_callback_args_t |
Callback function parameter data
Data Fields | ||
---|---|---|
void const * | p_context | Placeholder for user data. Set in wdt_api_t::open function in wdt_cfg_t. |
struct wdt_timeout_values_t |
struct wdt_cfg_t |
WDT configuration parameters.
Data Fields | |
wdt_timeout_t | timeout |
Timeout period. | |
wdt_clock_division_t | clock_division |
Clock divider. | |
wdt_window_start_t | window_start |
Refresh permitted window start position. | |
wdt_window_end_t | window_end |
Refresh permitted window end position. | |
wdt_reset_control_t | reset_control |
Select NMI/IRQ or reset generated on underflow. | |
wdt_stop_control_t | stop_control |
Select whether counter operates in sleep mode. | |
void(* | p_callback )(wdt_callback_args_t *p_args) |
Callback provided when a WDT ISR occurs. | |
void const * | p_context |
void const * | p_extend |
Placeholder for user extension. | |
void const* wdt_cfg_t::p_context |
Placeholder for user data. Passed to the user callback in wdt_callback_args_t.
struct wdt_api_t |
WDT functions implemented at the HAL layer will follow this API.
Data Fields | |
fsp_err_t(* | open )(wdt_ctrl_t *const p_ctrl, wdt_cfg_t const *const p_cfg) |
fsp_err_t(* | refresh )(wdt_ctrl_t *const p_ctrl) |
fsp_err_t(* | statusGet )(wdt_ctrl_t *const p_ctrl, wdt_status_t *const p_status) |
fsp_err_t(* | statusClear )(wdt_ctrl_t *const p_ctrl, const wdt_status_t status) |
fsp_err_t(* | counterGet )(wdt_ctrl_t *const p_ctrl, uint32_t *const p_count) |
fsp_err_t(* | timeoutGet )(wdt_ctrl_t *const p_ctrl, wdt_timeout_values_t *const p_timeout) |
fsp_err_t(* | callbackSet )(wdt_ctrl_t *const p_ctrl, void(*p_callback)(wdt_callback_args_t *), void const *const p_context, wdt_callback_args_t *const p_callback_memory) |
fsp_err_t(* wdt_api_t::open) (wdt_ctrl_t *const p_ctrl, wdt_cfg_t const *const p_cfg) |
Initialize the WDT in register start mode. In auto-start mode (Supported devices only) with NMI output it registers the NMI callback.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to pin configuration structure. |
fsp_err_t(* wdt_api_t::refresh) (wdt_ctrl_t *const p_ctrl) |
Refresh the watchdog timer.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* wdt_api_t::statusGet) (wdt_ctrl_t *const p_ctrl, wdt_status_t *const p_status) |
Read the status of the WDT.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_status | Pointer to variable to return status information through. |
fsp_err_t(* wdt_api_t::statusClear) (wdt_ctrl_t *const p_ctrl, const wdt_status_t status) |
Clear the status flags of the WDT.
[in] | p_ctrl | Pointer to control structure. |
[in] | status | Status condition(s) to clear. |
fsp_err_t(* wdt_api_t::counterGet) (wdt_ctrl_t *const p_ctrl, uint32_t *const p_count) |
Read the current WDT counter value.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_count | Pointer to variable to return current WDT counter value. |
fsp_err_t(* wdt_api_t::timeoutGet) (wdt_ctrl_t *const p_ctrl, wdt_timeout_values_t *const p_timeout) |
Read the watchdog timeout values.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_timeout | Pointer to structure to return timeout values. |
fsp_err_t(* wdt_api_t::callbackSet) (wdt_ctrl_t *const p_ctrl, void(*p_callback)(wdt_callback_args_t *), void const *const p_context, wdt_callback_args_t *const p_callback_memory) |
Specify callback function and optional context pointer and working memory pointer.
[in] | p_ctrl | Pointer to the WDT control block. |
[in] | p_callback | Callback function |
[in] | p_context | Pointer to send to callback function |
[in] | p_callback_memory | Pointer to volatile memory where callback structure can be allocated. Callback arguments allocated here are only valid during the callback. |
struct wdt_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
wdt_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
wdt_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
wdt_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void wdt_ctrl_t |
WDT control block. Allocate an instance specific control block to pass into the WDT API calls.
enum wdt_timeout_t |
enum wdt_clock_division_t |
WDT clock division ratio.
enum wdt_window_start_t |
enum wdt_window_end_t |
enum wdt_reset_control_t |
enum wdt_stop_control_t |
enum wdt_status_t |
WDT status