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.

SafeTI Diagnostic Library v2.2.0 demo project cannot run

Other Parts Discussed in Thread: TMS570LS1227

dear TI !

     we are starting using   safty dignostic library  v2.2.0 

     demo project :TMS570LS1227_NoOS  is build ok. 

      but when we download the program to the MCU. we fount  thare is a error happened. 

      error  code as bellows:(c file name: app_main_NoOS.c , line: 616)

  uint32 flashRegBackup=flashWREG->FDIAGCTRL;
        /* Run CRC Checks on Flash, with Fault Injected */
        /* Note1: The fault is injected on the first DWORD Access to flash and this location must not contain 0. Else the CRC check will PASS */
        /* Note2: The flash start address must point to the slave access port of flash */
        retVal = SL_SelfTest_Flash(FLASH_ECC_TEST_MODE_2BIT_FAULT_INJECT, TRUE, &failInfoFlash);
#ifdef __TI_COMPILER_VERSION__
        if (SL_CRC_Calculate((uint64 *)(((uint32)&ulFlashStartAddr) | 0x20000000u), ((((uint32)&ulFlashEndAddr)-((uint32)&ulFlashStartAddr)) >> 6)) == crcAtInit_FLASH) {
         periodicSTFailCount++;
} else {
periodicSTPassCount++;
}
#endif

     Our question is:

     1. SL_CRC_Calculate  to  check mirrored flash (eg : adress is 20000008) will  cause errorRAM exception. if we need to config some  parameter by HALgoGen?   

     2.  #ifdef __TI_COMPILER_VERSION__   where is the Macro be defined ?   

    

        

 

目前,我们正在尝试使用safty dignostic library进行芯片启动和运行过程中的自检 。

      
      示例程序 为 TMS570LS1227_NoOS
 
      demo程序 在下载到芯片后,无法正常工作,系统运行到app_main_NoOS.c 文件的616行就 退出了。  如下标红部分为程序出错的地方。
 
       主要问题是:
      
      1. Note2 是什么意思? 本项在检测什么  此部分代码没有看懂 (app_main_NoOS.c 616行程序注释)
      2.  0x20000000u 是从何而来 ,感觉程序出错的原因就是CRC校验时,发现程序起始地址或上 0x20000000u后, 地址就已经出错了,所以想问,这句话是不是demo程序写错了。
 
  uint32 flashRegBackup=flashWREG->FDIAGCTRL;
        /* Run CRC Checks on Flash, with Fault Injected */
        /* Note1: The fault is injected on the first DWORD Access to flash and this location must not contain 0. Else the CRC check will PASS */
        /* Note2: The flash start address must point to the slave access port of flash */
        retVal = SL_SelfTest_Flash(FLASH_ECC_TEST_MODE_2BIT_FAULT_INJECT, TRUE, &failInfoFlash);
#ifdef __TI_COMPILER_VERSION__
        if (SL_CRC_Calculate((uint64 *)(((uint32)&ulFlashStartAddr) | 0x20000000u), ((((uint32)&ulFlashEndAddr)-((uint32)&ulFlashStartAddr)) >> 6)) == crcAtInit_FLASH) {
         periodicSTFailCount++;
} else {
periodicSTPassCount++;
}
#endif
  • Hi Chenliang,

    2nd question is easy so I'll answer first - __TI_COMPILER_VERSION__   is  defined by the TI compiler.

    See table 2.5.1 Predefined Macro Names in the compiler manual (TI Literature # spnu151j):

    Back to the first question,  I'm having some trouble understanding the question.
    I've not seen the 'errorRAM' exception before in any docs so not sure what this is.  Maybe you could point me to the reference?