cancel
Showing results for 
Search instead for 
Did you mean: 

Change SPI CRC init value stm32F7

STM32Freakz
Associate II

I wonder How Ican change the init value of the spi crc. the only thing I can see that I´m able to configure is

SPI_HandleTypeDef *pSpiHandle;  
pSpiHandle->Init.CRCCalculation    = SPI_CRCCALCULATION_ENABLE;
pSpiHandle->Init.CRCLength         = SPI_CRC_LENGTH_16BIT;
pSpiHandle->Init.CRCPolynomial     = 0x1021;

using the HAL library..

But I want CCITT-FALSE and not CCITT-Zero

How can I change this?

1 REPLY 1

I don't know what is CCITT-FALSE exactly, but the reset value of CRC->DR is fixed to 0xFFFFFFFF so after CRC reset you might need to write a value which results in the required initial value in CRC->DR.

https://community.st.com/s/question/0D50X00009XkbxTSAR/crc-calculation-unit-initialize

JW