2.1.2.2 DIAG_SRAM_Checkerboard()
diag_result_t DIAG_SRAM_Checkerboard (uint16_t startAddress, uint16_t length, uint16_t bufferAddress)
The Checkerboard RAM test writes the checkerboard patterns to a sequence of adjacent memory locations. This test is performed in units (memory chunks) of four bytes. This is a non-destructive memory test. This test performs the following major tasks:
-
Saves the contents of the memory locations to be tested in the buffer defined by bufferAddress.
-
Writes the binary value (length is dependent upon architecture) 101010... to the memory location, 'N', and the inverted binary value, 010101..., to the memory location, 'N+1', and so on, until the whole memory chunk is filled.
-
Reads the contents of all the memory locations in the current chunk and verifies its contents. If the values match, the function continues; otherwise, it stops and returns an error.
-
Step 2 and 3 are repeated by writing the inverted pattern to the same locations.
-
Once a memory chunk is completed the test of the next chunk is started until all of the requested memory areas are tested.
Parameters: in startAddress Address to an array declared in user memory for test
in length Number of bytes to test
in bufferAddress Address to location in memory where array will be stored during test
Returns: DIAG_PASS - SRAM CF is not detected
DIAG_FAIL - SRAM CF is detected
DIAG_INVALID_ARG - When SRAM test addresses, test length, test region is invalid