Part Number: SAFETI_DIAG_LIB
I am using the following setup:
- TMS570LC4357 Hercules Microcontroller
- SafeTI-Lib V02.04.00
- CCSv9.2.0.00013
- TI v18.12.4.LTS Compiler
- Original demonstration project vom SafeTI-Lib with minor changes for another J-TAG emulator and applied other workarounds from spna215a.pdf besides the one discussed here
In the document spna215a.pdf are Known Issues stated including Workarounds.
Under HERCULES_SW-6124 there is the following Issue:
Flash self test using SDL on TMS570LC43x and RM57Lx devices causes abort.
The workaround makes sense to me, before it was possible to access an array outside its boundaries.
When I apply the workaround inside the code, it seems to work for the first run. But the example code runs 10 times trough all tests inside main.
After the first run, all other test-runs of SL_SelfTest_Flash for FLASH_ECC_TEST_MODE_1BIT will fail.
The reason is, that after the workaround the counter has the value 1 which leads to a value of 1 for the index, then instead of clearing the 0xA with a 0x5 at the correct position inside sl_epcREG1->CAM_INDEX[counter], which has the value 0x0505050A, it tries to clear the wrong position 0x0505050A, which is already on the value 0x5.
The test will still be exit as ST_PASS and TRUE on the first run. All subsequent runs fail, because the 0xA inside CAM_INDEX got never reset.
My workaround would be to insert the "counter ++;" after the following part of code instead of before:
if((volatile uint32 *)(sl_epcREG1->CAM_CONTENT[content] & EPC_CAM_CONTENT_ADDR) == (volatile uint32 *)(flashBadECC1 & EPC_CAM_CONTENT_ADDR)) { break; }
I would like to know if this is the correct way to do so, or if there is any other known way to handle this workaround.
Best regards,
Markus