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: Power ON flash safe

Part Number: TMS570LC4357
Other Parts Discussed in Thread: UNIFLASH

王工您好:

        我想咨询一下。

       1)我们通过CCS用J-link下载程序时,如何保证程序下载正确,不会出现错误?

       2)程序下载到Flash中后,tms570会自动生成ECC或者CRC保护吗?

       3)如果在程序下载完成后,然后断电。在下次上电前,存储数据的flash出现错误,那么上电后,tms570能检测到这个错误吗?

       4)TMS570中的程序运行,如果不在cmd文件中特殊指定的情况下,是否加载到ram中运行,还是直接在flash中运行?     

  •  1)我们通过CCS用J-link下载程序时,如何保证程序下载正确,不会出现错误?

    The CCS and Uniflash support flash verification after the code has been loaded to flash. There are two types of verification - fast and full. Fast is the default (since full can take some time). Fast verification will validate the contents a few memory location (the first and last several bytes of memory and some random locations in between). Full verification will validate the full contents of memory. The validation process is to compare the contents of memory with the data contained in the loaded file.

  •  2)程序下载到Flash中后,tms570会自动生成ECC或者CRC保护吗?

    The CCS and Uniflash support ECC generation:

    By default, the on-chip Flash Plugin erases the flash before programming, generates ECC for the executable and programs it along with the main array flash content and verifies the programmed content. If needed, users can enable blank check - CPU verification to confirm that flash is erased before programming. 

    You can use linker cmd file to generate ECC during link step. The –ecc options provided in the link step in CCS has to be enabled. When -ecc is enabled, linker will generate the ECC image for the flash application and append it at the end of the executable. TI flash tools (CCS and UniFlash) are capable of programming this appended ECC image instead of the default generated Auto ECC. When using the linker ECC option, Auto ECC Generation provided in the TI flash tools should be disabled.

    About how to generated ECC using Linker CMD file, please refer to the notes at the following link:

    https://software-dl.ti.com/hercules/hercules_docs/latest/hercules/How_to_Guides/index.html

  • 3)如果在程序下载完成后,然后断电。在下次上电前,存储数据的flash出现错误,那么上电后,tms570能检测到这个错误吗?

    1. You can calculate the CRC of the application image during boot-up, and compare the calculated CRC with the predetermined and hardcoded CRC value.

    2. Since the flash is protected by ECC, when you read data from flash, the ECC is checked. 

     4)TMS570中的程序运行,如果不在cmd文件中特殊指定的情况下,是否加载到ram中运行,还是直接在flash中运行?     

    As far as I know, you need place the output section to SRAM and run from SRAM. The linker can assign each output section two locations in target memory: the location where the section will be loaded and the location where it will be run.

    In your c code, you have to copy the code to SRAM manually.

    Please refer to my bootloader example. The F021 Flash APIs related code is programmed to Flash, but executes from SRAM.