STM32U5 CRC init parameters
- December 17, 2025
- 1 reply
- 155 views
Hello,
I would like to calculate a CRC-16/IBM-SDLC.

I configure the CRC_HandleTypeDef structure as below for HAL_CRC_Init function:
h->Init.DefaultPolynomialUse = DEFAULT_POLYNOMIAL_DISABLE;
h->Init.DefaultInitValueUse = DEFAULT_INIT_VALUE_DISABLE;
h->Init.GeneratingPolynomial = 0x00001021U;
h->Init.CRCLength = CRC_POLYLENGTH_16B;
h->Init.InitValue = 0x0000FFFFU;
h->Init.InputDataInversionMode = CRC_INPUTDATA_INVERSION_BYTE;
h->Init.OutputDataInversionMode = CRC_OUTPUTDATA_INVERSION_ENABLE;
h->InputDataFormat = CRC_INPUTDATA_FORMAT_BYTES;
But it seems that the parameters 'InputDataInversionMode' and 'OutputDataInversionMode' have no effect because I get 0xA60C as result for input 0x11 0x22 0x33 0x44 what it is matching with CRC-16/GENIBUS.
Someone could be help me to understand the issue?
