Example S32K144 RAM selftest simple S32DS 2018.R1

File uploaded by Lukas Zadrapa Employee on Jun 6, 2019
Version 1Show Document
  • View in full screen mode

* Detailed Description:
* RAM self-test is performed after reset in startup_S32K144.s file.
* The RAM self-test should be executed right after reset, so it does not destroy
* data loaded to RAM by init functions. The code is inserted after
* initialization of core registers. RAM initialization is commented out because
* the same operation is done by the self-test.
* The test flow is:
* 1. Write pattern 0x55AA55AA to first word in RAM
* 2. Read the data back
* 3. Compare the data and increment error counter if not equal
* 4. Write inverse pattern 0xAA55AA55 to first word in RAM
* 5. Read the data back
* 6. Compare the data and increment error counter if not equal
* 7. Clear the first word in RAM to leave whole RAM erased to ‘0’ at the end of test
* This procedure is repeated for whole RAM.
* If the error counter is different from zero at the end, the program stays in
* endless loop until watchdog reset.
* ------------------------------------------------------------------------------
* Test HW:         S32K144EVB-Q100
* MCU:             FS32K144UAVLL 0N57U
* Fsys:            Default
* Debugger:        Lauterbach Trace32
* Target:          internal_FLASH