const uint8_t TextString1[] = "0123456789";
CRC.CNTX[0].CRC_CFG.R = 0x00000005; /* CRC-32 polynomial, Inversion selection enabled */
CRC.CNTX[0].CRC_CSTAT.R = 0xFFFFFFFF; /* Seed value 0xFFFFFFFF */
for(i=0; i<sizeof(TextString1)-1; i++) /* size of TextString1 is decreased by 1 due to null character of string */
*(uint8_t*)&CRC.CNTX[0].CRC_INP.R = TextString1[i];
crc_outpt = CRC.CNTX[0].CRC_OUTP.R;
Output:
crc_outpt = 0x63e32165
But when i enter the same string on CRC32 Online calculator in following link
the result is a684c7c6
Why is this difference in output of CRC32? Can you suggest any settings to be modified
Hi,
to get the same result, you need to write 0x7 to CFG register - set both 'swap' and 'inversion' bits.
Regards,
Lukas