This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS1227: Code gets stuck too often in _c_int00 on esmREG check ..

Expert 2025 points
Part Number: TMS570LS1227

I do many re-flashing now while debugging and i've started to hit this problem too often - code gets stuck on boot in this section:

    /* 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 */                 
/* USER CODE BEGIN (25) */
/* USER CODE END */
    }

I don't think there is actual hw error, or it shouldn't be .. At the same time, I didnt' see any comments that this test should be disabled while debugging.

Any idea whats happening?  Today/now i can't get passed it, might need to power cycle the board, as no amount of debug restarts help seems.

  • full power cycle gets it out, but as soon as I start debugging it gets stuck again, on the first break point it... after this, re-setting the target through the debugger, makes is stuck again on exact same place, with no way out but full power down again.

  • Hello V01d,

    The microcontroller detects an error. This error is a severe error of type ESM group 3. Please check the ESMSR3 register and determine which flag is set. Did you also see the nERROR LED turned ON? Are you running any ECC test?

    In the debugger go to Registers browser and under the Esm->Sta3 you will see some flags set. You can also clear these flags by writing a '1' to them.

  • It seems does this often.  I 'm not entirely sure, but it could be due to how debugger flashes the flash / may be not full re-flash (just a guess).

    If I step out / forcefully move the PC out of it, it seems to proceed initialization Ok, and even pass the RAM ECC check later - you know, one with triggered abort & handles, does it x2.  

    I don't know what kind of ghosts I get, on the HDK, but I get it often at least few times  a day.  Yesterday, it _seems_ a full re-build followed by re-flash removed it. I'm Unsure exactly what it was, but the code was same before, after reflash and it ran only after full clean.