Hello
In short:
If I flash a application (size 0xE110 bytes) then the HDK board does not start and
Flash Check fails.
If I flash small application (attached) then sometimes the boards recovers and
starts without error - in other words it is not a persistent problem.
I do not know the details of the HDK board and BSP.
It seems the application influences the result of hardware checks. This is unexpected.
I do not know how to workaround/fix it.
Martin
Detailed version:
I have
* Code Composer Studio Version: 6.1.2.00014
* TMDX570LS31HDK (= TMS570LS3137)
* HAL Code Generator 04.05.01
HDK worked for a long time.
Now we flashed application and then the debugger could not connect anymore.
We fixed this problem by using Warm Reset (button S3 nRST) during flash and
now we can flash again without problems, but the board does not start anymore.
We traced the problem to sys_startup.c :
/* Check if there were ESM group3 errors during power-up.
* These could occur during eFuse auto-load or during reads from flash OTP
* during power-up. Device operation is not reliable and not recommended
* in this case.
* An ESM group3 error only drives the nERROR pin low. An external circuit
* that monitors the nERROR pin must take the appropriate action to ensure that
* the system is placed in a safe state, as determined by the application.
*/
if ((esmREG->SR1[2]) != 0U)
{
/* USER CODE BEGIN (24) */
/* USER CODE END */
/*SAFETYMCUSW 5 C MR:NA <APPROVED> "for(;;) can be removed by adding "# if 0" and "# endif" in the user codes above and below" */
/*SAFETYMCUSW 26 S MR:NA <APPROVED> "for(;;) can be removed by adding "# if 0" and "# endif" in the user codes above and below" */
/*SAFETYMCUSW 28 D MR:NA <APPROVED> "for(;;) can be removed by adding "# if 0" and "# endif" in the user codes above and below" */
for(;;)
{
}/* Wait */
Memory View : esmREG at 0xFFFFF500
The value of registers:
Esm_Stat1 = 0x0000_0000
Esm_Stat2 = 0x0000_0000
Esm_Stat3 = 0x0000_0080
=> This means ESM Group 3, Channel 7, unrecoverable error in Flash wrapper (FMC).
FMCFEDACSTATUS =(0XFFF8701C) = 0x0001_0100
=> This means :
bit 16: B2_COR_ERR Bus 2 Correctable Error
bit 8: B1_UNC_ERR Bus 1 Uncorrectable Error Flag - register FUNC_ERR_ADD contains error location.
FUNC_ERR_ADD =(0XFFF87020) = 0x0003_D298
If I look with memory viewer at 0x0003_D298 then it shows all bits set (0xFFFF_FFFF).
We have a second HDK board flash a large application triggers the fault :
Esm_Stat1 = 0x0000_0400
Esm_Stat2 = 0x0000_0000
Esm_Stat3 = 0x0000_0080
FMCFEDACSTATUS =(0XFFF8701C) = 0x0000_0100
FUNC_ERR_ADD =(0XFFF87020) = 0x0003_D250
MEMORY CONFIGURATION :
name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
VECTORS 00000000 00000020 00000020 00000000 X
FLASH0 00000020 0017ffe0 0000e110 00171ed0 R X
FLASH1 00180000 00180000 00000000 00180000 R X
STACKS 08000000 00001500 00000000 00001500 RW
RAM 08001500 0003eb00 00000e9e 0003dc62 RW
=> 0x3D250 vs 0x3D298 = same area of the flash. The size of the app is smaller (0xE110 used)