RAFW Flexible Software Package Documentation  Release v2.0.1

 
Watchdog Service Interface

Detailed Description

Interface for Watchdog Service APIs.

Summary

The Watchdog Service provides watchdog functionality to monitor system tasks and avoid system freezes.

Data Structures

struct  watchdog_service_cfg_t
 
struct  watchdog_service_api_t
 
struct  watchdog_service_instance_t
 

Typedefs

typedef void watchdog_service_ctrl_t
 

Data Structure Documentation

◆ watchdog_service_cfg_t

struct watchdog_service_cfg_t

Configuration parameters.

Data Fields
wdt_instance_t const * p_wdt To use WDT, link a WDT instance here.
void const * p_context Placeholder for user data.
void const * p_extend Placeholder for user extension.

◆ watchdog_service_api_t

struct watchdog_service_api_t

Functions implemented at the HAL layer will follow this API.

Data Fields

fsp_err_t(* open )(watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg)
 
fsp_err_t(* registerTask )(watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t *p_id)
 
fsp_err_t(* unregisterTask )(watchdog_service_ctrl_t *const p_ctrl, uint8_t id)
 
fsp_err_t(* suspend )(watchdog_service_ctrl_t *const p_ctrl, uint8_t id)
 
fsp_err_t(* resume )(watchdog_service_ctrl_t *const p_ctrl, uint8_t id)
 
fsp_err_t(* notify )(watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t id)
 
fsp_err_t(* resumeAndNotify )(watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t id)
 
fsp_err_t(* notifyFromIdle )(watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg)
 
fsp_err_t(* setLatency )(watchdog_service_ctrl_t *const p_ctrl, uint8_t id, uint8_t latency)
 
fsp_err_t(* setIdleId )(watchdog_service_ctrl_t *const p_ctrl, uint8_t id)
 

Field Documentation

◆ open

fsp_err_t(* watchdog_service_api_t::open) (watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg)

Initialize and start the Watchdog Service.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to pin configuration structure.

◆ registerTask

fsp_err_t(* watchdog_service_api_t::registerTask) (watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t *p_id)

Register a current task with the Watchdog Service.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to pin configuration structure.
[out]p_idPointer to id of registered task.

◆ unregisterTask

fsp_err_t(* watchdog_service_api_t::unregisterTask) (watchdog_service_ctrl_t *const p_ctrl, uint8_t id)

Unregister a task from the Watchdog Service.

Parameters
[in]p_ctrlPointer to control structure.
[in]idId of unregistered task.

◆ suspend

fsp_err_t(* watchdog_service_api_t::suspend) (watchdog_service_ctrl_t *const p_ctrl, uint8_t id)

Suspend monitoring a task by the Watchdog Service.

Parameters
[in]p_ctrlPointer to control structure.
[in]idId of task to suspend monitoring.

◆ resume

fsp_err_t(* watchdog_service_api_t::resume) (watchdog_service_ctrl_t *const p_ctrl, uint8_t id)

Resume monitoring of a task by the Watchdog Service.

Parameters
[in]p_ctrlPointer to control structure.
[in]idId of task to resume monitoring.

◆ notify

fsp_err_t(* watchdog_service_api_t::notify) (watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t id)

Notify the Watchdog Service about a task.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to pin configuration structure.
[in]idId of task for notification.

◆ resumeAndNotify

fsp_err_t(* watchdog_service_api_t::resumeAndNotify) (watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg, uint8_t id)

Resume monitoring of a task and notify the Watchdog Service about the task.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to pin configuration structure.
[in]idId of task to resume monitoring and notify.

◆ notifyFromIdle

fsp_err_t(* watchdog_service_api_t::notifyFromIdle) (watchdog_service_ctrl_t *const p_ctrl, watchdog_service_cfg_t const *const p_cfg)

Notify the Watchdog Service about the idle task.

Parameters
[in]p_ctrlPointer to control structure.
[in]p_cfgPointer to pin configuration structure.

◆ setLatency

fsp_err_t(* watchdog_service_api_t::setLatency) (watchdog_service_ctrl_t *const p_ctrl, uint8_t id, uint8_t latency)

Set watchdog latency for a task.

Parameters
[in]p_ctrlPointer to control structure.
[in]idId of task for setting latency.
[in]latencyLatency value.

◆ setIdleId

fsp_err_t(* watchdog_service_api_t::setIdleId) (watchdog_service_ctrl_t *const p_ctrl, uint8_t id)

Set watchdog ID of the idle task.

Parameters
[in]p_ctrlPointer to control structure.
[in]idId of idle task.

◆ watchdog_service_instance_t

struct watchdog_service_instance_t

This structure encompasses everything that is needed to use an instance of this interface.

Data Fields
watchdog_service_ctrl_t * p_ctrl Pointer to the control structure for this instance.
watchdog_service_cfg_t const * p_cfg Pointer to the configuration structure for this instance.
watchdog_service_api_t const * p_api Pointer to the API structure for this instance.

Typedef Documentation

◆ watchdog_service_ctrl_t

Control block. Allocate an instance specific control block to pass into the API calls.