Contains API prototypes for Tasks shared between several Task Managers.
More...
|
| 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.
|
Contains API prototypes for Tasks shared between several Task Managers.
- Version
- 1.0.0-alpha.1
- Copyright
- © 2024 Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip software and any derivatives exclusively with Microchip products. It is your responsibility to comply with third party license terms applicable to your use of third party software (including open source software) that may accompany Microchip software.
THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
UML Class Diagrams
UML Activity Diagrams
UML Sequence Diagrams
◆ 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
-
| newTimeout | Number 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.