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.

CCS/TMS570LC4357: Initial power up generate random error at ESM Group 3 with Safety Library

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

Hello,

I have begun to develop safety purpose system using TMS570LC43 series. 

However, there is not resolvable problem myself which is random error occurrence at esm Group3 L2RAMW uncorrectable double bit error.

this error is only occurred at initial power up once (error occur randomly), and then never happened after esm error reset even though inserting POR reset.

I have tested whole cases such as power sequence, reset sequence, ... etc.

but, this problem could not be cleared.

And, additionally I have found this kind of error is occurred at EVK board as well.

could you please share trouble shooting history about this?

now i just temporary prevent this problem using SW reset if kind of esm group3 error is recognized.

(Power up -> error clear -> any reset -> problem clear and never re-happen until power on/off)

now i guess that the reason is power turn on switching impulse, but not tested yet.

regards

  • Hello,

    Please, check whether this is the same issu as yours: e2e.ti.com/.../742562

  • thanks for your reply

    I saw that linked post before i wrote this. 

    That post and answers mean startup self-test code may occure L2RAMW error.

    however, I think this error is not because of these start up self-test code.

    if the linked answer is true, system can generate same error again when i insert reset signal during self-test operation.

    But, never be happened again after inserting reset (whatever reset is ok).

    so, just i wanna know is TMS570LC43xx of possibility to indicate this kind of error because of initial power turn on switching impulse or chattering phenomenon.

    Thanks.

  • Part Number: TMS570LC4357

    Tool/software: Code Composer Studio

    Hello

    I have a problem which is still not resolved myself. 

    previously i posted same question.

    the random error occur at ESM group3 error.

    sometimes system go into deadlock by ESM Group3 error filtering code only when initial power-up.

    never be happened again if errors are cleared and then any reset is inserted as well.

    this error is happened only once at power-up

    firstly, I guessed this is because of the power timing error.

    but 3.3V IO voltage and 1.2V core voltage sequence are not influence to this problem 

    also, i have tested reset sequence timing with POR reset signal.

    this problem is still exist.

    lastly, I suspect a possibility of that power turn on switching noise(chattering) effect generate this error.

    Because this problem is happened on not only our custom board but also your EVK board.

    If chattering noise is inserted to TMS570LC43xx through ground line, is it possible to generate ESM Group 3 error?

    Honestly, This problem is temporarily prevented by forcing the sw reset when an error is recognized on my custom board.

    My system works very well without any problem. but, i just wanna get guarantee this alternative method can be used for safety purpose device. 

    regards.

  • The reset handler executes different start-up sequences based on the cause of reset. Do you use GCC tool-chain for your project? If so, can you remove the "naked" attribute from the getResetSource() function?

  • Hello,

    I'm co-working the questioner. I reply about your guide.

    I check getResetSource() function has no "naked".

    I tell you our firmware source state.

    - Hardware : TMS5704357

    - Software : Based on Ti Safety Library

    I have questions about this problem.

    1. the linked site and your guide talk about getResetSource() function. In our source, getResetSource() function is not used.

       - To solve ESM flag error, getResetSource() function must be used? Then, I generate the HL_sys_startup.c code by HALCoGen. How can i use this function. There is no define to use getResetSource() function. I cannot use this code. Let me guide to use this function.

    The blocked source code is as follows,

    #if 0
    /* USER CODE END */

        /* Initialize Core Registers to avoid CCM Error */
        _coreInitRegisters_();
     
        /* Initialize Stack Pointers */
        _coreInitStackPointer_();

        /* Reset handler: the following instructions read from the system exception status register
         * to identify the cause of the CPU reset.
         */
     rstSrc = getResetSource();
        switch(rstSrc)
        {
            case POWERON_RESET:
      /* Initialize L2RAM to avoid ECC errors right after power on */
      _memInit_();

      /* Add condition to check whether PLL can be started successfully */
            if (_errata_SSWF021_45_both_plls(PLL_RETRIES) != 0U)
      {
       /* Put system in a safe state */
       handlePLLLockFail();
      }
      
    /*SAFETYMCUSW 62 S MR:15.2, 15.5 <APPROVED> "Need to continue to handle POWERON Reset" */
            case DEBUG_RESET:
            case EXT_RESET:

    /* USER CODE BEGIN (6) */
    #endif

    2. I wonder we pass this problem as follows temporary. I want to know this solution has no problem.

      - In the power on/off state physically(plug on/off), esm group3 flag(esmREG->SR1[2]) is occurred.

       -> So, to solve this problem if the esm group3 flag occurred in startup, we do reset.

     

    - Code is as follows, GREEN color is new inserted code

    (1) In _C_int00 function

        resetReason = SL_Init_ResetReason();
        switch(resetReason)
        {

            case RESET_TYPE_POWERON:
            case RESET_TYPE_DEBUG:
            case RESET_TYPE_EXTRST:
            case RESET_TYPE_EXTRST_NERROR:
            case RESET_TYPE_SWRST:

    ......

    systemInit();

            if ((esmREG->SR1[2]) != 0U) {
                resetReason = RESET_ERROR;
            }

    ....

    break;

    // switch function finish

    ....

    if((RESET_TYPE_DEBUG != resetReason) && (RESET_ERROR != resetReason))

    (2) in after_STC function

        _cacheEnable_();

    /* USER CODE BEGIN (24) */
    /* USER CODE END */


    /* USER CODE BEGIN (25) */
        debug_printf( "reset type = %d \n\r",resetReason);
        if (resetReason == RESET_ERROR){
            debug_printf("\033[1;31mSystem Failure detected - Power Sequence error\n\rError cannot be cleared(keep going)\n\r\033[m");
            //regulator enter the active state and reset will be caused by error forcing
            systemREG1->SYSECR |= ((uint32)0x03u<<14);
        }
    /* USER CODE END */

            /* initialize global variable and constructors */
        __TI_auto_init();

    Regards,

    Minwoo

  • Hi Minwoo,

    You don't have to use the getResetSource() function. However, please follow the sequence of steps shown in this function. For example, the first step in the getResetSource() function is to initialize the CPU SRAM to avoid ECC errors on start-up. Your code does not do this.

    Can you add a call to initialize the CPU SRAM before the call to systemInit()? Also, please call the function to workaround the PLL start-up issue described in the errata document. Do you have the function calls to initialize the CPU registers and stack pointers before reading the cause of reset?

    Regards, Sunil

  • Hello, Sunil

    I omit the initialize code. the Initialize sequence as follows,

    void _c_int00(void)

    {

    SL_Init_R5Registers();

    SL_Init_StackPointers();

    _SL_Init_EnableEventExport();

     resetReason = SL_Init_ResetReason();
        switch(resetReason)
        {
            case RESET_TYPE_POWERON:
            case RESET_TYPE_DEBUG:
            case RESET_TYPE_EXTRST:
            case RESET_TYPE_EXTRST_NERROR:
            case RESET_TYPE_SWRST:

           SL_Init_Memory(RAMTYPE_RAM);

           systemInit();

            if ((esmREG->SR1[2]) != 0U) {
                resetReason = RESET_ERROR;
                //JMPEsmCmd(reset);
            }

            sciInit();
            rtiInit();

    break;

    ...

    ... 

    }

    }

    ------------------------------------------

    Now I find this problem in the other way.

    Every code generated by HALCoGen include the problem code :

            /* 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. */
            if ((esmREG->SR1[2]) != 0U)
            {
               while(1); //ESM group3 error
            }

    Would you tell me why this code is used?

    -> This Qustion is not generated by me, So can you reply about this question in another link generated by me :

    https://e2e.ti.com/support/microcontrollers/hercules/f/312/p/851014/3148419#3148419

    Regards,

    Minwoo