|
SmartSnippets DA1459x SDK
|
Watchdog service. More...
Files | |
| file | sys_watchdog.h |
| Watchdog header file. | |
Functions | |
| void | sys_watchdog_init (void) |
| int8_t | sys_watchdog_register (bool notify_trigger) |
| void | sys_watchdog_unregister (int8_t id) |
| void | sys_watchdog_suspend (int8_t id) |
| void | sys_watchdog_resume (int8_t id) |
| __RETAINED_HOT_CODE void | sys_watchdog_notify (int8_t id) |
| void | sys_watchdog_notify_and_resume (int8_t id) |
| void | sys_watchdog_set_latency (int8_t id, uint8_t latency) |
| __RETAINED_HOT_CODE void | sys_watchdog_idle_task_notify () |
Watchdog service.
| __RETAINED_HOT_CODE void sys_watchdog_idle_task_notify | ( | ) |
Notify sys_watchdog module about the idle task being alive
The idle task must use this to notify sys_watchdog module that it's alive. This should be done in application level and frequently enough to fit into hw_watchdog interval set by dg_configWDOG_RESET_VALUE. The idle task monitoring is controlled via
| void sys_watchdog_init | ( | void | ) |
Initialize sys_watchdog module
This should be called before using sys_watchdog module, preferably as early as possible.
| __RETAINED_HOT_CODE void sys_watchdog_notify | ( | int8_t | id | ) |
Notify sys_watchdog module about a task being alive
Registered task must use this periodically to notify sys_watchdog module that it's alive. This should be done frequently enough to fit into hw_watchdog interval set by dg_configWDOG_RESET_VALUE.
| [in] | id | identifier from the task's registration to the service |
| void sys_watchdog_notify_and_resume | ( | int8_t | id | ) |
Notify sys_watchdog module for task with handle id and resume its monitoring
This function combines the functionality of sys_watchdog_notify() and sys_watchdog_resume().
| [in] | id | identifier from the task's registration to the service |
| int8_t sys_watchdog_register | ( | bool | notify_trigger | ) |
Register the calling task
Returned identifier shall be used in all other calls to sys_watchdog. Once registered, task must notify sys_watchdog periodically using sys_watchdog_notify() to prevent watchdog expiration. Notifications are decided in application level. However, a task can request to be triggered periodically using OS task notify feature. In this case it is expected to notify-back sys_watchdog as a response, calling sys_watchdog_notify().
dg_configWDOG_NOTIFY_TRIGGER_TMO shall be set to non-zero for notify_trigger to have any effect.| [in] | notify_trigger | true if task notify should be triggered periodically |
| void sys_watchdog_resume | ( | int8_t | id | ) |
Resume a task to be monitored again
Resumes a task monitoring, that was previously suspended by sys_watchdog_suspend().
| [in] | id | identifier from the task's registration to the service |
| void sys_watchdog_set_latency | ( | int8_t | id, |
| uint8_t | latency | ||
| ) |
Set watchdog latency for task
This allows task to miss given number of notifications to sys_watchdog without triggering platform reset. Once set, it's allowed that task does not notify sys_watchdog for latency consecutive hw_watchdog intervals (as set by dg_configWDOG_RESET_VALUE) which can be used to allow for parts of code which are known to block for long period of time (i.e. computation). This value is set once and does not reload automatically, thus it shall be set every time increased latency is required.
| [in] | id | identifier from the task's registration to the service |
| [in] | latency | latency |
| void sys_watchdog_suspend | ( | int8_t | id | ) |
Suspend a task from being monitored
Suspended task is not unregistered entirely but will not be monitored by watchdog until resumed. It's faster than unregistering and registering task again.
| [in] | id | identifier from the task's registration to the service |
| void sys_watchdog_unregister | ( | int8_t | id | ) |
Stop monitoring a task
| [in] | id | identifier from the task's registration to the service |
1.8.16