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-EP: Checksum internal flash

Part Number: TMS570LC4357-EP
Other Parts Discussed in Thread: TMS570LS3137, TMS570LC4357

Hello,

in our past project, to check the integrity of the internal flash where the SW resides, we reads the content of the internal flash and on it we apply a dedicated checksum. In particular we use the xor byte to byte, bit to bit, and at the end this checksum is negated to avoid that the memory empty results as valid.

With this method we use the EOC in motorola format (S3) and then this file is loaded on our PC application that read and parse the file and finally computes the checksum above described.

In order to successfully complete the check on the uP, we assume that the portion of flash not used is empty (the reading value is 0xFFFFFFFF).

When we had used the TMS570LS3137, this method works, but with the new uP (TMS570LC4357-EP) it doesn't work. My suggestion is caused by the ECC on the flash. Is It correct?

So now, is it possible to generate the HEX file with the content of the entire flash (FLASH0) with all information? Or is there another method with the same approach?

 

Best regards.

Domenico

  • Hi Domenico,

    My suggestion is caused by the ECC on the flash. Is It correct?

    On TMS570LC4357, the ECC is enabled by default, and can not be disabled.

    is it possible to generate the HEX file with the content of the entire flash (FLASH0) with all information? Or is there another method with the same approach?

    Did you try the hex utility in CCS?

  • Hello ,

    thank you for your reply.

    Did you try the hex utility in CCS?

    As I described, we use EOC in motorola format that is part of HEX utility. In this file only a portion of the flash is written. My question is if it possible to generate the hex file with the content of the entire flash inlcuding the ECC information (the empty part is not always set to 0xFFFFFF but sometimes has a byte different from 0xFF, in example 0xFDFFFFFF).

    In second instance the uP has a CRC module, is it possible to use it for check the integrity of the internal flash?

    Regards,

    Domenico

  • In second instance the uP has a CRC module, is it possible to use it for check the integrity of the internal flash?

    Yes, the HW CRC module can be used to test the integrity of flash content by calculating a CRC for all flash contents and comparing this value to previous generated "golden" CRC. The read of Flash contents to the CRC can be done by CPU or the DMA.