7.6.1 Functions
diag_result_t __nopa DIAG_SRAM_MarchCMinus (register volatile uint8_t *startAddress, register uint16_t length, register diag_sram_march_mode_t mode)
Software Requirement Reference ID : SW_SRAM_MARCH_TEST_01
Implements the March C- algorithm, converted to a Word-Oriented Memory (WOM) test. See the Word-Oriented Memory Conversion section for a full explanation of how the March algorithm works. See the Assumption of Use section for a list of all the AoUs for this API.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.diag_result_t DIAG_SRAM_MarchGetStartupResult (void)
Returns the result of DIAG_SRAM_MarchCMinus() diagnostic when called with the SRAM_MARCH_STARTUP mode as the input parameter. This API is intended to be called from the main() function after executing DIAG_SRAM_MarchStartup() in the start-up code.
diag_result_t __nopa DIAG_SRAM_MarchPeriodic (void)
Handles nondestructive periodic March testing in overlapping sections of the SRAM used by the application, defined by DIAG_SRAM_DATA_REGION_LEN. This API wrapper is intended to be called periodically to test the next SRAM section as long as DIAG_SRAM_MARCH_PERIODIC_ENABLED is not zero. Each time the function is called, the next SRAM section is backed up in a buffer, tested using the DIAG_SRAM_MarchCMinus() function in SRAM_MARCH_PARTIAL mode and restored from the buffer before the result of the test is returned. This is done on all SRAM sections until it wraps around and starts testing the first SRAM section again. The function also handles testing the stack area by temporarily moving the stack pointer to a reserved temporary stack while performing the march test to return safely. Finally, in compliance with AoU-SRAM_MARCH_TEST-07 in Assumption of Use, the Global Interrupt Enable bit is backed up and disabled when entering the function and restored before returning.