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.

TMS570LC4357进行安全产品开发。SafeTI Diagnostic Library(V2.4.0),出现不能使用的问题,需要贵方支持一下

Other Parts Discussed in Thread: TMS570LC4357

硬件:

1: 我们用TI官方的TMS570LC4357 DEMO板和SafeTI Diagnostic Library的DEMO程序做实验(我们的自研板也有同样问题)

问题:

1:发现电脑连接TMS570LC4357 DEMO板进行DEBUG调试时,TMS570LC4357芯片的nERROR引脚自动被激活(低电平),表现为DEMO板ERROR灯被点亮。

2:同时SafeTI Diagnostic Library在sl_priv.c文件的_SL_HoldNClear_nError()函数内,进入while(TRUE == SL_ESM_nERROR_Active())的死循环,SafeTI Diagnostic Library无法进行安全自检。

3:我们通过查找TMS570的勘误表,第56条有个错误描述:“DEVICE#56 nERROR assertion on debugger connect”。解决方法是:“Clear the nERROR by writing 0x5 to the ESMEKR key register in the ESM module and ignore  the nERROR pin toggle which happens immediately upon the debugger connecting.”。但是SafeTI Diagnostic Library的DEMO程序源码里面其实有对ESMEKR写入0x5的操作,实际也是无效的。

求助:

如何解决TMS570LC4357芯片在调试模式不能运行安全自检库的问题呢?非常感谢!

  • 很抱歉,由于手边没有TMS570LC4357 DEMO板,所以无法上手测试。我将向国外的工程师来咨询您描述的问题。

    我会在得到回复的第一时间给您回复,请您耐心等待一下,谢谢
  • 非常感谢,期待你这边的回复
  • 以下是相关的回复,请您参考:

    The Cortex R5F CPU may generate speculative fetches to any location within the Flash memory space. A speculative fetch to a location with invalid ECC, which is subsequently not used, will set the ESM flags for a correctable or uncorrectable error. An uncorrectable error will unconditionally cause the nERROR pin to toggle low. Therefore care must be taken to generate the correct ECC for the entire Flash space including the holes between sections and any unused or blank Flash areas.

    Please use linker cmd file to generate ECC for the whole flash. https://processors.wiki.ti.com/index.php/Linker_Generated_ECC

    When uncorrectable error occurs, the corresponding bits in ESM group 3 is set. The code will be in the loop in 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. */
    if ((esmREG->SR1[2]) != 0U)
    {
       esmGroup3Notification(esmREG,esmREG->SR1[2]);
    }

    #pragma WEAK(esmGroup3Notification)
    void esmGroup3Notification(esmBASE_t *esm, uint32 channel)
    {
    /* enter user code between the USER CODE BEGIN and USER CODE END. */
    /* USER CODE BEGIN (5) */
    /* USER CODE END */
         for(;;)
         {
         }/* Wait */
    /* USER CODE BEGIN (6) */
    /* USER CODE END */
    }

  • 你好,感谢回复。
    感觉不像是ECC的问题,因为正常跑是没有问题的,单步调试时才会出现帖子描述的问题。