FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches

Contains API prototypes for the Shutdown Task Manager. More...

Files

file  task_manager_shutdown.c
 Implements APIs for the Shutdown Task Manager.

Functions

void TM_ShutdownExit (void)
 Requests the Shutdown Task Manager to exit the Shutdown sequence with a device reset.
void TM_Shutdown (const scheduleEntry_t appShutdownTask)
 Manages Tasks that ensure safe execution of device sleeping in Standby and Power-Down.

Detailed Description

Contains API prototypes for the Shutdown Task Manager.

Version
1.0.0-alpha.1

The Shutdown Task Manager is responsible for executing the Shutdown sequence to safely enter deep sleep modes (Standby and Power-Down).

Function Documentation

◆ TM_Shutdown()

void TM_Shutdown ( const scheduleEntry_t appShutdownTask)

Manages Tasks that ensure safe execution of device sleeping in Standby and Power-Down.

Todo
The TM_Shutdown has not yet been implemented. Instead, a function prototype is provided to give an indication of its intended behavior. The function implementation and any required Tasks, Middleware and Drivers dependencies are planned to be included in the full release.

SUBJECT TO CHANGE: the planned functionality for this Task Manager is to ensure a safe transition into deeper sleep modes (Standby and Power-Down). This is planned to be achieved by first calling the provided Task that should handle application-specific shutdown procedures (such as sending a message to a higher ranking system or disabling peripherals and external components) and enabling a periodic wakeup source, e.g. the Periodic Interrupt Timer (PIT). The Shutdown procedure will continue with a transition into the Safe State by floating all I/O pins on the device, re-configure the timeout of the Watchdogs (typically longer timeouts to be able to sleep longer intervals) and initiate the selected sleep mode. Before entering sleep, an optional CRCSCAN of Flash can be initiated using the Idle sleep mode. Each time the device wakes up, the Watchdogs are handled before going back to sleep. Once an application-specific interrupt handler calls TM_ShutdownExit API, the Shutdown procedure will end by issuing a device reset.

Note
In order to go into deep sleep modes, which disables certain safety mechanisms, it is recomended to enter a Safe State and reset the application afterwards in order to properly re-initialize the Safety Mechanisms and run diagnostics. This Task Manager provides this option.
The Synchronous Watchdog Timer does not run while the system is in any sleep mode, and will thus be configured to always be in an open window and clear it each time the device wakes up with a timeout set by a macro configuration. The WDT timeout is also set with a macro config.
If the application requires the usage of an I/O pin interrupt wake-up source, a macro configuration will be provided to optionally skip force floating all I/O pins. If enabled, the Application Shutdown Task is responsible for manually tri-stating all other I/O pins.
Parameters
appShutdownTaskCallback to application-specific Shutdown Task with the expected duration.

Definition at line 30 of file task_manager_shutdown.c.

◆ TM_ShutdownExit()

void TM_ShutdownExit ( void )

Requests the Shutdown Task Manager to exit the Shutdown sequence with a device reset.

Todo
The TM_ShutdownExit() function has not yet been implemented. See TM_Shutdown.
Warning
Calling this function will have a side effect of resetting the device when executing TM_Shutdown.

Definition at line 25 of file task_manager_shutdown.c.