2015-04-08 08:10 AM
I am hoping someone has experience using the CRC engines with success. I am feeding the CRC input register with 32 or 16 or 8 bit sizes of the same data and the CRC produces different outputs. I have to be doing something wrong. Seeded with $FFFFFFFF. Any special concerns with using the eDMA or the CRC would be appreciated.
2015-04-09 12:48 PM
I found out from the helpful folks at ST that the CRC generator does not put out a CRC16-CCITT or a CRC32 ethernet as advertized without a little bit of manipulation first. Since it is pretty tough to get a DMA to do this manipulation, it is nearly impossible to send data into the CRC engine with a DMA and expect the industry standard CRC results. Check erratas for info about using the CRC engine that missed getting into the RM0022.
2015-04-28 06:19 AM
2015-05-27 09:08 AM
Hello James ,
Did you solve your issue ? When i populate the CRC Engine by byte / by word. i have the same result. we have tested by SW or by HW (8 bits /32 bits) .. the result is the same .(crc_struct[instance].CRC_n)->CNTX[instance].CRC_INP.W = WORD;
or
(crc_struct[instance].CRC_n)->CNTX[instance].CRC_INP.B[0] = ((uint8_t)(WORD & 0x000000FF));
(crc_struct[instance].CRC_n)->CNTX[instance].CRC_INP.B[1] = ((uint8_t)((WORD & 0x0000FF00) >> 8));
(crc_struct[instance].CRC_n)->CNTX[instance].CRC_INP.B[2] = ((uint8_t)((WORD & 0x00FF0000) >> 16));
(crc_struct[instance].CRC_n)->CNTX[instance].CRC_INP.B[3] = ((uint8_t)((WORD & 0xFF000000) >> 24));
/*-----------------------------------------------------------------------*/
Parameters:
polynom : 0x4C11DB7
order : 32
crcinit : 0xFFFFFFFF direct, 0x46AF6449 nondirect
crcxor : 0xFFFFFFFF
refin : 1
refout : 1
Results:
/*-----------------------------------------------------------------------*/
Expected value is = 0xE951A406
Actual value from IPs is = 0xE951A406
Test passed
Tomorrow, i am going to send to you a non-official application developped from ''SPC5Studio''.
Have you got a small example of your application ?
Best regards
Erwan