2014-12-16 03:39 AM
Good morning there is someone who has found the whole chart
of the values, of the SPI_CRCPolynomial ?? like: SPI_InitStructure.SPI_CRCPolynomial
= 7; I have see 7 the most useful value, but who knows the other values and the meaning?? may be value from 1 to 8 ?? or over ?? Thank you Best regards2014-12-16 04:14 AM
This field (and CRC register) defines the CRC polynomial in a binary form. You could see some standard CRC-8 polynomials from here (scroll to the table at the bottom):
http://en.wikipedia.org/wiki/Cyclic_redundancy_check Value 7 corresponds to CRC-8-CCITT.2014-12-16 06:19 AM
Thank you, now is more clear!:
do you know if there is a disable value in the SP1 STM32F100...STM32F101 family like: hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLED; of the STMF4 micro I have SPI_InitStructure.SPI_CRCPolynomial = 7; 0 isn't a valid value in the structure, i don't know i fthere is a disable value, when i not use the CRC ??? Thank you2014-12-16 06:31 AM
Well one might expect it to be an 8-bit value (and perhaps 16-bit if that width selected).
It's not an ''ARM'' peripheral, the peripherals are added to the core by the vendor, in this case ST The polynominals present as a binary representation, with the high order bit inferred as it's always one and just beyond the scope of the register. So 0x07 -> 0x107 -> x8 + x2 + x1 + 1http://en.wikipedia.org/wiki/Polynomial_representations_of_cyclic_redundancy_checks
As I recall you have to jump through other hoops at the end of the transmission to send the CRC, or read the status register to see if they match (ie divide with a remainder of zero). But I think it gets computed either way.2014-12-16 07:26 AM
2014-12-16 08:36 AM
Thanks