AnsweredAssumed Answered

SPI SD crc7

Question asked by Luke on May 12, 2012
Latest reply on May 13, 2012 by Clive One
I would like to use the SPI CRC capabilities to generate the CRC7 byte for a SD SPI command frame.  The command frame is 6 bytes long, with the final CRC byte structure as follows:
CRC[7:1] -- CRC7 of first 5 bytes of command frame
CRC[0] -- 1

The generator polynomial for CRC7 is:
G(x) = x^7 + x^3 + x^0

The part I'm having trouble with is how to get the resulting CRC7 to be shifted to the left by one bit, and have the 0 bit set before the SPI sends out the CRC byte.  As it is, it seems to just calculate the CRC7 and leave it in the low 7 bits.

Is there a way to change the CRC polynomial so it will effectively shift the generated CRC over 1 bit and set the 0 bit?