CRC calculation unit (CRC)
1. Enable CRC AHB clock using RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC,
ENABLE) function.
2. Select the polynomial size: 7-bit, 8-bit, 16-bit or 32-bit.
3. Set the polynomial coefficients using CRC_SetPolynomial();
4. If required, select the reverse operation on input data using
CRC_ReverseInputDataSelect();
5. If required, enable the reverse operation on output data using
CRC_ReverseOutputDataCmd(Enable);
6. If required, set the initialization remainder value using CRC_SetInitRegister();
7. use CRC_CalcCRC() function to compute the CRC of a 32-bit data or use
CRC_CalcBlockCRC() function to compute the CRC if a 32-bit data buffer.
6.2.2 CRC configuration functions
ï‚· CRC_DeInit()
ï‚· CRC_ResetDR()
ï‚· CRC_PolynomialSizeSelect()
ï‚· CRC_ReverseInputDataSelect()
ï‚· CRC_ReverseOutputDataCmd()
ï‚· CRC_SetInitRegister()
ï‚· CRC_SetPolynomial()
6.2.3 CRC computation functions
ï‚· CRC_CalcCRC()
ï‚· CRC_CalcCRC16bits()
ï‚· CRC_CalcCRC8bits()
ï‚· CRC_CalcBlockCRC()
ï‚· CRC_GetCRC()
6.2.4 CRC Independent Register (IDR) access functions
ï‚· CRC_SetIDRegister()
ï‚· CRC_GetIDRegister()
6.2.5 CRC Independent Register (IDR) access functions
6.2.5.1 CRC_DeInit
Deinitializes CRC peripheral registers to their default reset values.