How can I put in and calculate my own data in the CRC module?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        I used a software calculated CRC but it takes too much time for calculating. So I want to implement the hardware CRC module of the controller. In the first step, I build it up like in the CRC example project given by Cypress. There is a permanent hight signal at the input. In the second step, I want to put in my own data over a register like given in the attached picture. But the calculated CRC doesn't fit. Can someone give me an advice, how I can calculate my own data? Greetings Markus   
0 Likes
2 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The result of the CRC calculation depends on the polynomia you use. You should check that with your former algorithm.

   

To save some resources, you may ^combine your control-registersw into a single one and write the corresponding bit patterns to it.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

The polynomia is checked, that is the same in both cases which I compared. It seems to be a problem tht I  wanted to write byte wise but I have to put every single bit in it.

   

That I  just tried out but I got different values. I use the polynomia 0x8005 and I put always a 1 in it. My software calculation gives a 0x0202 after 1 byte input as result. When I try the same with the hardware module the result is:

   

After bit 1: 0x000B; after bit 2: 0x001D; 0x0031; 0x0069; 0x00D9; 0x019; 0x0379 and after bit 8 0x06F9 but not 0x0202 what I expected.

0 Likes