Functions | |
| uint8_t | SelfTest_SRAM (stl_sram_test_mode_t type, uint8_t *startAddr, uint32_t size, uint8_t *buffAddr, uint32_t buffSize) |
| This function performs the self test on a block of RAM. | |
| uint8_t | SelfTest_SRAM_March_Full (uint32_t startAddress, uint32_t endAddress, uint32_t blockSize, uint32_t backupAddress, stl_sram_march_mode_t mode) |
| Full SRAM test using March algorithm (assembly implementation, no stack usage during the test). | |
| uint8_t | SelfTest_SRAM_March_Runtime (uint32_t startAddress, uint32_t endAddress, uint32_t *currentAddress, uint32_t blockSize, uint32_t backupAddress, stl_sram_march_mode_t mode) |
| Runtime SRAM test using March algorithm (assembly implementation, no stack usage during the test). | |
| uint8_t SelfTest_SRAM | ( | stl_sram_test_mode_t | type, |
| uint8_t * | startAddr, | ||
| uint32_t | size, | ||
| uint8_t * | buffAddr, | ||
| uint32_t | buffSize ) |
This function performs the self test on a block of RAM.
It can detect stuck-at faults and direct coupling faults. The RAM tests are destructible in nature, so the function also accepts a temporary buffer that can be used to store/restore memory block under test. The RAM block under test must not overlap with memory that is not supposed to be overwritten for e.g. stack. This kind of situation must be tested at the startup. Because of RAM destructible behavior, it is advisable to disable the interrupts before starting the test.
| type | The type of RAM test to run. |
| startAddr | The pointer to the start of the RAM block to test. |
| size | The size of RAM block to test. |
| buffAddr | The pointer to the start of the buffer to use for store/restore data of RAM block to test. If NULL, test would be performed without store/restore being performed. |
| buffSize | The size of the buffer, which is used for store/restore. If buffSize is smaller than the size, the test internally loops through the RAM block operating on memory size equal to buffSize in each iteration. |
| uint8_t SelfTest_SRAM_March_Full | ( | uint32_t | startAddress, |
| uint32_t | endAddress, | ||
| uint32_t | blockSize, | ||
| uint32_t | backupAddress, | ||
| stl_sram_march_mode_t | mode ) |
Full SRAM test using March algorithm (assembly implementation, no stack usage during the test).
Tests the entire RAM range from startAddress to endAddress. The backup area is tested first to ensure its integrity.
This function is suitable for testing both variable RAM and stack regions because it does not use the stack during the March test execution.
| startAddress | Start of RAM region to test (must be 4-byte aligned). |
| endAddress | End of RAM region to test (must be 4-byte aligned). |
| blockSize | Size of each test block in bytes (must be 4-byte aligned). |
| backupAddress | Backup area address. Must be outside the tested region and at least blockSize bytes. |
| mode | March algorithm to use, see stl_sram_march_mode_t |
| uint8_t SelfTest_SRAM_March_Runtime | ( | uint32_t | startAddress, |
| uint32_t | endAddress, | ||
| uint32_t * | currentAddress, | ||
| uint32_t | blockSize, | ||
| uint32_t | backupAddress, | ||
| stl_sram_march_mode_t | mode ) |
Runtime SRAM test using March algorithm (assembly implementation, no stack usage during the test).
Tests one block per call for periodic runtime testing. Maintains test progress via currentAddress pointer.
When currentAddress equals startAddress, the backup area is tested. After testing the last block, currentAddress wraps back to startAddress.
This function is suitable for testing both variable RAM and stack regions because it does not use the stack during the March test execution.
| startAddress | Start of RAM region to test (must be 4-byte aligned). |
| endAddress | End of RAM region to test (must be 4-byte aligned). |
| currentAddress | Pointer to current test position. Initialize to startAddress before first call. Updated by the function to track progress. Wraps to startAddress after full range is tested. |
| blockSize | Size of each test block in bytes (must be 4-byte aligned). |
| backupAddress | Backup area address. Must be outside the tested region and at least blockSize bytes. |
| mode | March algorithm to use, see stl_sram_march_mode_t |