Software Requirement Reference ID : SW_SRAM_MARCH_TEST_01.
This API implements the March-C Minus algorithm, converted to a Word Oriented Memory (WOM) test. See the SRAM_MARCH_TEST Assumptions of Use (AoU) section for a full description of how this API should be used.
The test is destructive, meaning that all data stored in SRAM will be permanently deleted when the test is completed, to ensure full test coverage of the listed Coupling Faults (CFs).
If the stack pointer (SP) is set equal to the SRAM_END_ADDR and the API is subsequently called before any other function in the .init0 section, the API can detect all the listed failure modes for the entire SRAM used by the application, including the stack area (located in SRAM), and return normally as the return address is backed up. As the test is performed in the .init0 section, before any other function calls, no application data is lost as this is loaded into SRAM at a later stage in the startup code.
The API supports the possibility to verify smaller sections of the SRAM, such as an array, in the application code as an additional periodic check check. However, be warned that such usage is not covered by the SRAM_MARCH_TEST AoU. This is because certain CFs between a memory cell under test and a memory cell left out of the test might not be detected. Moreover, note that the data on all the SRAM addresses tested will be permanently overwritten. If used in this way, it is advisable to back up the data stored in the memory under test to another place in SRAM and restore it after completion of the test. Such usage of the API can be done from anywhere in the application code. However, it is not adviseable to include the stack area of SRAM when useing the API in this way. If the stack area is not included, the API can be called without setting the SP to SRAM_END_ADDR first. Finally, note that the main clock frequency will be set to the default value after the test is completed.
The API supports the possibility of changing the execution time of the March-C Minus WOM algorithm by two different mechanisms, if desireable to meet certain deadlines as outlined by the SRAM_MARCH_TEST AoU:
If an error is detected while executing any of the March elements, the return address is restored (when applicable) and the main clock frequency is restored to the default value before returning as fast as possible.
The March-C Minus WOM test algorithm performed by executing the following march elements:
Error reporting:
DIAG_SRAM_MarchC_Minus_GetStatus should be called from main to know the result of of SRAM March-C Minus testvoid DIAG_SRAM_MarchC_Minus(
register uint8_t * startAddress, register uint16_t length
)
startAddress |
register uint8_t *
The start address of the memory under test. |
length |
register uint16_t
Defines the size of the memory under test. |
void | See DIAG_SRAM_MarchC_Minus_GetStatus |