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.

TMS320F280049C: C2000™ microcontrollers forum

Part Number: TMS320F280049C


Hi,

I am writing a custom flash bootloader for TMS320F280049C and I need a method to calculate a CRC32 for the flash area that I update from the bootloader. It should match with CRC32 calculated using 0xedb88320 polynomial. So, I would like to know how it can be accomplished.

Hoping for a quick response.

Regards,

Pradeep

  • Pradeep,

    The TMS320F280049C device does have a few CRC instructions. On this device they are hardcoded to specific polynomials. There is no specific one for 0xEDB88320, however, there is one for the inverse 0x04C11DB7 (VCRC32H_1 and VCRC32L_1). I am not 100%, but I believe if you feed the data in with the bits reversed, and then at the end of the CRC reverse the bits of the output, you will see the same result as if you used 0xEDB88320. Try that and let me know. You will need to use embedded assembly code for these instructions as the C language does not have a construct for translating CRC instructions to HW.

    To embed assembly into your C-file you can use the following from the TMS320C28x Optimizing C/C++ Compiler v20.8.0.STS User Guild (www.ti.com/.../):

    asm(";*** this is an assembly language comment");

    Regards,

    Dave Foley

  • Hi David, 

    Thanks for responding. I have written a custom function to calculate CRC which is serving my purpose.

    Regards,

    Pradeep