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

Contains API prototypes for Tasks shared between several Task Managers. More...

Files

file  tasks_shared.c
 Implements APIs for Tasks shared between several Task Managers.
file  tasks_shared_private.c
 Implements private functions for tasks_shared.h.
file  tasks_shared_private.h
 Contains private function prototypes for tasks_shared.h.

Functions

void T_HandleSyncWatchdog (uint32_t newTimeout)
 Waits until the current Synchronous Watchdog timeout is completed before clearing and setting the next timeout.

  • This function handles the Synchronous Watchdog Timer (SWDT) by pre-clearing and clearing it in the correctly timed sequence, and setting a new timeout period value. By this, the SWDT is restarted with a new initial counter value. It is also responsible for executing the optional MW_DiagSwdtCount diagnostic, if enabled compile-time. See DIAG_PERIODIC_SWDT_COUNT for more details. Any detected diagnostic faults and input parameter errors are reported to the Error Handler.

void T_HandleWatchdog (void)
 Clears the Watchdog Timer (WDT) while performing the WDT count diagnostic.
void T_HandleNotificationErrors (void)
 Ensures Error IDs with 'NOTIFICATION' criticality are handled.

Detailed Description

Contains API prototypes for Tasks shared between several Task Managers.

Version
1.0.0-alpha.1
UML Class Diagrams

UML Activity Diagrams

UML Sequence Diagrams

Function Documentation

◆ T_HandleNotificationErrors()

void T_HandleNotificationErrors ( void )

Ensures Error IDs with 'NOTIFICATION' criticality are handled.

This function checks all Error Controller channels configured with 'NOTIFICATION' criticality. For each set channel, it reads and clears the error source, clears the channel, and reports the error to the Error Handler to be logged as a 'NOTIFICATION' error. Once all the notification errors are logged, the function invokes the Error Handler to process the log, which may include previously logged errors.

Note
To optimize memory usage, the static configuration in the errorIdCritLut is used to include or exclude channels at compile-time.
Error Controller channels set to 'IGNORE' in the errorIdCritLut are not checked.
For scheduling of this Task see DUR_HANDLE_NOTIFICATION_ERRORS.
Warning
Configuring the EVSYS0 or EVSYS1 Error Controller channels to use a "level" event type as the error source in the Event System will prevent clearing the channel, requiring both the source and channel to be cleared in the notification error handler callback.

Definition at line 56 of file tasks_shared.c.

◆ T_HandleSyncWatchdog()

void T_HandleSyncWatchdog ( uint32_t newTimeout)

Waits until the current Synchronous Watchdog timeout is completed before clearing and setting the next timeout.

  • This function handles the Synchronous Watchdog Timer (SWDT) by pre-clearing and clearing it in the correctly timed sequence, and setting a new timeout period value. By this, the SWDT is restarted with a new initial counter value. It is also responsible for executing the optional MW_DiagSwdtCount diagnostic, if enabled compile-time. See DIAG_PERIODIC_SWDT_COUNT for more details. Any detected diagnostic faults and input parameter errors are reported to the Error Handler.

Parameters
newTimeoutNumber of clock cycles until the SWDT can be pre-cleared after the current timeout period is completed.
Note
The 'newTimeout' value is the closed window for the SWDT. Adding the configured SWDT_OPEN_WINDOW yields the SWDT RESET value. Once the SWDT window has opened, the SWDT can be cleared and hence, restart immediately. This ensures that the SWDT period is always 'newTimeout' clock cycles.
Warning
A 'newTimeout' value resulting in a calculated SWDT RESET larger than 24-bit is reported as an error and discarded, and the current SWDT RESET value is re-used for the next period.

Definition at line 177 of file tasks_shared.c.

◆ T_HandleWatchdog()

void T_HandleWatchdog ( void )

Clears the Watchdog Timer (WDT) while performing the WDT count diagnostic.

This function is responsible for clearing the Watchdog timer. It is intended to be called at a set interval to ensure that the Watchdog is cleared within the Fault Detection Time Interval (FDTI) of the device. The function is also responsible for optionally executing the MW_DiagWdtCountEnd diagnostic, which detects whether the WDT counter is stuck and reports any detected faults to the Error Handler. See DIAG_PERIODIC_WDT_COUNT for enabling or disabling this feature.

Warning
It is assumed that this function is called at the correct time to clear the Watchdog. If called while the Watchdog is in the closed window, the device will be reset by the Watchdog.
Note
See WWDT_CLOSED_WINDOW, WWDT_OPEN_WINDOW and INIT_WDT_DURATION for configuration of the watchdog timeout.

Definition at line 209 of file tasks_shared.c.