CRC problem
Hello,
I am trying to use the CRC module on a STM32G491 (bare metal). But I simply can not get the same CRC as when I calculate it with some online tools.
With
https://www.lddgo.net/en/encrypt/crc
and
https://www.sunshine2k.de/coding/javascript/crc/crc_js.html
I get 0xA6322B20 as custom CRC for simply the value 0x05 and pol 0x04C11DB7 and init value 0xFFFFFFFF in 32bit (no revs).
RCC->AHB1ENR |= bit12; // enable CRC clock
CRC->CR |= bit0; // reset CRC
while((CRC->CR&bit0)==bit0); // probably not necassary
CRC->DR = 5;
uint32_t crc = CRC->DR;
This gives me the value 0xD0C1B610. The Polynomial formula on lddgo is stated as x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1 which is the same as stated in the RM0440 section 16 page 454.
So where am I going wrong???
