mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-12-16 18:08:04 +00:00
Add startup and watchdog modules
This commit is contained in:
33
README.md
33
README.md
@@ -2,10 +2,39 @@
|
||||
|
||||
Library using cmsis_os2.h functionality for RTOS projects.
|
||||
|
||||
Modules are enabled via defines set in `sta/config.hpp` provided by the application.
|
||||
|
||||
|
||||
## System events
|
||||
|
||||
Enable via `STA_SYSTEM_EVENT_ENABLE` defined in `sta/config.hpp`.
|
||||
Enable: `STA_SYSTEM_EVENT_ENABLE`
|
||||
|
||||
Requires setup of a `systemEvent` EventFlag in the project.
|
||||
Requirements:
|
||||
* EventFlag: `systemEvent`
|
||||
|
||||
|
||||
## Watchdog
|
||||
|
||||
Watchdog task gets woken periodically (every `STA_WATCHDOG_TIMER_PERIOD` ticks) or via `sta::nofityWatchdog(uint32_t)` calls
|
||||
and calls `sta::watchdogEventHandler(void *, uint32_t)`. Applications *must* implement `sta::watchdogEventHandler(void *, uint32_t)`.
|
||||
|
||||
|
||||
Enable: `STA_WATCHDOG_ENABLE`
|
||||
|
||||
Requirements:
|
||||
* Task: `watchdog`
|
||||
* Timer: `heartbeat`
|
||||
|
||||
Configuration:
|
||||
* Heartbeat timer period: `STA_WATCHDOG_TIMER_PERIOD` (defaults to `1000`).
|
||||
|
||||
|
||||
## Startup task
|
||||
|
||||
Startup task calls `sta::startupTaskExtras(void *)`, starts the watchdog timer if enabled and terminates the thread.
|
||||
`sta::startupTaskExtras(void *)` may be overridden by the application.
|
||||
|
||||
Enable: `STA_STARTUP_TASK_ENABLE`
|
||||
|
||||
Requirements:
|
||||
* Task: `startupTask` (alternative: call manually in freertos.c default task)
|
||||
|
||||
Reference in New Issue
Block a user