CMSIS-RTOS2
Version 2.2.0
Real-Time Operating System: API and RTX Reference Implementation
|
CMSIS-RTOS defines Thread Watchdogs that allow to control timing constraints for thread execution (temporal isolation).
Each thread has an independent watchdog timer that is started with the function osThreadFeedWatchdog(uint32_t ticks). The ticks value specifies the timeout before it expires. Within this time interval the function osThreadFeedWatchdog must be called again within the thread to restart the watchdog timer.
If the thread watchdog is not restarted during the specified amount of ticks the Watchdog Alarm callback osWatchdogAlarm_Handler(osThreadId_t thread_id) is triggered and can be used to recover the system or proceed to the system shutdown.
Figure below explains the concept with an example:
Fault Handling provides more details on the available possibilities for system recovery.
Summary of functions that implement thread watchdog functionality