cancel
Showing results for 
Search instead for 
Did you mean: 

About CRC

matic
Associate III
Posted on October 30, 2015 at 20:08

Hi. I want to make SSI protocol with SPI peripheral on STM32F3 series. Also want to use DMA for Tx. There is a hardware CRC calculation unit, which calculate CRC above all data and is attached as last byte (in my case).  I have to send out 2 bytes of important data and 8 less important bytes. Now, I know that it is possible to calculate CRC above all 10 bytes and CRC will become 11th byte.

Is there any possibilities to have CRC as third byte, which should be calculated only above first two important bytes. Other, less important data doesn't need to have CRC and customer could also avoid it - do not read it at all. He would wait only for first 2 bytes of important data and CRC as third byte. If he want to read other data too, then he should wait for it.

Any suggestions?

#crc #ssi
2 REPLIES 2
Posted on October 30, 2015 at 22:20

Given all the sequencing and gyrations required to get the CRC out, you'd be better of just computing the value, stuffing it in the DMA buffer, and then just light that off.

For two bytes it's probably overkill to use a CRC, a simple XOR would probably suffice.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
matic
Associate III
Posted on October 31, 2015 at 08:13

Thanks. That would be probably the best solution, yes.