2015-04-08 04:09 AM
I'm trying to
use
the
CRC
peripheral on STM32F3
to calculate the
CRC
atbyte-level
but I can not
get the same result
asindicated
inapplication note
AN4187
.The
following snippet of
code should
return a
CRC
equal to
0x4C
(according to AN4187) instead
I get 0x80
.Where
is the error
? CRC->INIT = 0xFF; CRC->CR = CRC_CR_POLYSIZE_1; CRC->POL = 0xCB; CRC->CR |= CRC_CR_RESET; CRC->DR = 0xC1; p.s. Theperipheral
clock has been enabled. Many thanks in advance for your help. #stm32f3-crc2015-04-08 06:58 AM
Perhaps you want
*((uint8_t *)&CRC->DR) = 0xC1;
2015-04-09 12:54 AM
That's right!
Clive
thanks
for your
invaluable
support!
Best Regards