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: SafeTiLib Function SL_CRC_Calculate question

Part Number: TMS570LC4357

Hi experts,

I was looking into the CRC-Modul and was wondering how to Implement the CRC-Calculation in Full-CPU Mode.
I found the function SL_CRC_Calculate() in the sl_misc.c of the SafeTi Library, which looks completly unfinished to me.

(Q1) Can you pls explain how the function is supposed to work?

Thank you and best regards,
Max

  • Hi Max,

    The SL_CRC_Calculate() is a complete working function. Did you get any problem when suing this function?

  • Hi QJ,

    I did not try, but I misunderstood how the function works.

    What I am confused by is that the PSA Signature register gets overwritten each loop, which lead me to believe that the calculated value gets overwritten each loop and thus the CRC gets overwritten by the flash value each loop.

    (Q1) Could you clarify how this works internaly?

  • Hi Max,

    CRC controller is used to calculate the signature for a set of data and then compare the calculated signature value with a pre-determined good signature value.

    There is one PSA Signature Register per CRC channel. PSA Signature Register can be read and written. When it is written, it compresses the data. When PSA Signature Register is read, it gives the calculated signature.

    For Semi-CPU mode and AUTO mode, when one sector of data patterns is compressed, the signature stored at the PSA Signature Register is copied to the PSA Sector Signature Register. The PSA Sector Signature Register instead of PSA Signature Register should be read for calculated CRC.