stm32f103re CRC ?
hi
i used of CRC in stm32CubeMX and for check true worked CRC used of two online CRC calculator site:
https://www.sunshine2k.de/coding/javascript/crc/crc_js.html
&
https://crccalc.com/?crc=123456789&method=&datatype=0&outtype=0
i think stm32cubeIDE internal CRC use of standard CRC32_MPEG2:
Polynomial = 0x4C11DB7
Initial value = 0xFFFFFFFF
Final XoR Value = 0x0
Input reflected = disable
Result reflected = disable
Am I correct and have I written the CRC parameter values for stm32f103 exactly right?
...........
but CRC result for stm32CubeIDE different with online CRC calculator site?
example:
stm32 CRC for 0x00 = 0xc704dd7b
online CRC calculator site for 0x00 = 0x4E08BFB4
stm32 CRC for 0x01 = 0xc3c5c0cc
online CRC calculator site for 0x01 = 0x4AC9A203
stm32 CRC for 0x02 = 0xce86e615
online CRC calculator site for 0x02 = 0x478A84DA
stm32 CRC for 0xFF = 0x76f39dcf
online CRC calculator site for 0xFF = 0xFFFFFF00
............ my Code:
#include "main.h"
void SystemClock_Config(void);
int main(void)
{
extern CRC_HandleTypeDef hcrc;
//CRC
uint32_t buff[2];
uint32_t result = 0xffffffff;
uint32_t i = 0;
//
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_USART1_UART_Init();
MX_I2C1_Init();
MX_SPI1_Init();
MX_CRC_Init();
while (1)
{
i = 0;
while(i < 256)
{
buff[0] = i;
result = HAL_CRC_Calculate(&hcrc, &buff[0], 1);
i++;
}
}
}
-------------------------
please help me

