cancel
Showing results for 
Search instead for 
Did you mean: 

SPC560P40 eDMA feeds CRC engine. Wrong CRC values produced

jamesteske9
Associate II
Posted on April 08, 2015 at 17:10

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.

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
3 REPLIES 3
jamesteske9
Associate II
Posted on April 09, 2015 at 21:48

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.

Erwan YVIN
ST Employee
Posted on April 28, 2015 at 15:19

Hello James ,

Sorry for the late answer.

 I am checking in our side if we have an application note to help you.

      Best Regards

                   Erwan

Erwan YVIN
ST Employee
Posted on May 27, 2015 at 18:08

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