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.

MSPM0L1105: CRC Calculation of Flash for Integrity Checks

Part Number: MSPM0L1105

Tool/software:

Hello Team TI,

I am using MSPM0L1105 for a communication module.

Kindly consider our below requirement:

We are claiming our instrument for Risk Class C as per Welmec Software Standard certification.  
This European standard demands the provision of CRC check of entire Flash Memory in run-time to detect any kind of corruption or anomaly in the MCU program during operation.
In order to achieve this, we would have to carry out the following:
1. Calculate the CRC of final .hex file,
2. Write the Calculated CRC into a particular flash memory address (say 0xYY),
3. Continuously calculate the CRC in run time and validate the same with CRC already present at memory location 0xYY.
Folks like Renesas has a dedicated provision to handle this kind of requirement.
We have referred to the Technical Reference Manual Section 1.4.2.4 Application CRC Verification, but could not find in-depth description.
We are looking for further details and its linkage with CCS to implement and verify the same.
Could you please share with us an Application Note that can guides us regarding this matter, or can you recommend any other ways for the same.
Thanks and Regards.
  • Hello Rahul,

    I will reply to you tomorrow because I am out of office today,

    Best Regards,

    Janz Bai

  • Hello Janz,

    We are looking forward for your response...

    Meanwhile Kindly find the below update of developments at our end, for the objective we have:

    For (1 & 2): We used a utility called SRecord to calculate the CRC of .hex and writing that CRC at a particular location in hex. I think it quite an awesome tool for these stuffs.

    Link: https://srecord.sourceforge.net/

    It would be really great if these features are included in CCS environment.

    For (3): i. We use Lammert Bies website for all our CRC needs, we have verified and tested its correctness of results on multiple MCU platforms.

    Link: www.lammertbies.nl/.../crc-calculation

    With that regard we evaluated the Hardware CRC accelerator provided in MSPM0.

    gData32 = 0x01;
    gCrcSeed  = 0xFFFFFFFF;
    crcChecksum = DL_CRC_calculateBlock32(CRC, gCrcSeed, &gData32, 1);

    We tried all sort of possible combination in CCS settings for CRC accelerator. The value calculated by MSPM0 never matches the CRC calculated at Lammert's website for any input string say gData= 0x01. FYI, the website calculates CRC_32 for following settings: Big Endian, init value = 0xFFFFFFFF.

       ii. So we used open-source code from Lammert's website for CRC calculation of MSPM0 flash in run-time instead of its own CRC accelerator.

    As of now using all these external patches we have achieved all our objectives (1, 2 & 3). We are further validating the results, but we still want to hear from you about these issues.  

    Thanks and Regards.

  • Hello Rahul,

    I am sorry that our current tool can just do CRC verification when you download the file into MCU. We don't have related demo code about this requirement currently. Maybe we will develop related tools and demos in the future, and you can continue to use the external patches now.

    Best Regards,

    Janz Bai