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.