2020-08-05 01:54 AM
Hi all,
I am sending a message via USART from STM32F303 (later to be moved from STM32F3 to STM32F427) to an X86.
The message consists of 2 parts payload + crc ,CRC is calculated on stm32 using crc hardware engine and calling CRC_CalcCRC/CRC_CalcCRC16bits/CRC_CalcBlockCRC appropriately.
I would like to do a crc check for the payload upon receipt by the X86 and validate against CRC available within the packet.
So i sourced x86 code authored by Swhite (https://community.st.com/s/question/0D50X00009XkbhnSAB/crc-calculation-in-software), to calculate crc on x86.
But the crc computed by stm32 doesn't match the crc computed by this code.
A copy of the x86 crc code is attached as a zip.
Could someone please tell me how to proceed ?
Thanks for the answers and ideas in advance.
2020-08-05 02:28 AM
Ensure that the polynomial, initial value and input/output bit/byte order are the same.