6.1.3.4 DIAG_SRAM_MarchStartup()
inline static void DIAG_SRAM_MarchStartup (void )
Handles the testing of the entire SRAM used by the application, as defined by DIAG_SRAM_DATA_REGION_LEN. This API wrapper is intended to be
the first function call in the .init0 section that runs before entering main() function.-
Disabling global interrupts (no restoration)
-
Only perform the test if the WDT reset flag is not set to ensure compatibility with the WDT diagnostic test. It is the responsibility of the system integrator to reset the flag in case of an unintended WDT reset in order to ensure that the March test is run at start-up.
-
Sets an alternate main clock frequency defined by DIAG_SRAM_MARCH_ALT_CLK_FRQ before running the diagnostic and restores it back to default when the test is complete, if DIAG_SRAM_MARCH_ALT_CLK_FRQ_ENABLED is not zero.
-
Calls DIAG_SRAM_MarchCMinus() in SRAM_MARCH_STARTUP mode on the entire SRAM used by the application to get full coverage of the listed Fault Models.
This function is NOT intended to be called from the main() function.
The function is declared static inline with the always_inline attribute to ensure that no CALL instruction is issued before executing the March test, as this would cause undefined behaviour as the function would not be able to back up the correct return address.
None. |
Call DIAG_SRAM_MarchGetStartupResult() from the main()function to get the result of the test. |