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.

CRC 32 Calculation Mismatch for 32 bytes Misaligned Files



Hello!!

I am using the  Texas Instruments TIVA DM-TM4C123G board.

I wish to calculate the CRC32 value  of a .bin file by downloading the file from the GSM modem internal memory .This extraction is done 32 bytes at a time by sending AT commands to the modem.

I achieve this 32 byte CRC  calculation by implementing the  code which is provided in the following link (line 619)

https://github.com/yuvadm/tiva-c/blob/master/driverlib/sw_crc.c

I am trying to verify the calculated CRC32 value of this entire file in the method with the value provided by

(Texas Instruments ) LM Flash Programmer(Build 1572).

The CRC 32 value calculated by my code matches with the value of LM Flash only for files

that are 32 bytes aligned i.e. no. of bytes in the file is a multiple of 32.

But for files that are not 32 bytes aligned there is a mismatch in CRC32 values.

I tried the method which was posted in the link below.

http://e2e.ti.com/support/microcontrollers/stellaris_arm/f/471/t/303329.aspx

I first tried to pad the array with 0x00 as well as  0xff but the values did not match.

I also tried to swap the first 16 bytes with the second 16 bytes of the 32 byte array but the values did not match.

Can any one of the fellow community members  suggest a suitable solution to this problem.


Thanx