Question
STM32F4DISCOVERY CRC ISSUE
Posted on May 25, 2015 at 14:57
Hi,
I'm working on the stm32f4discovery board, with the last version of keil µvision. I used library from stm32Cube. I have problem with CRC peripheral : I can't get a right result. My initialize code, before my infinite loop :hcrc.Instance = CRC;
HAL_CRC_Init(&hcrc);
__HAL_RCC_CRC_CLK_ENABLE();
When i use CRC :
uint8_t data[64];
/*for test only*/
data[0]=0x1a;
data[1]=0x03;
data[2]=0x31;
data[3]=0x32;
data[4]=0x33;
__HAL_CRC_DR_RESET(&hcrc);
CRCvalue = HAL_CRC_Calculate(&hcrc, (uint32_t*) data, 5);
When I execute this code, i'm waiting CRCvalue = 89CE6D10 (value calculate by crc online tools, and i have the same result on my computer with my own program) but the value of my calculate CRC is :CRCvalue = 909801CA
What am I doing wrong ?
Thanks for your help,