Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Space_Invaders_Demo neopixels gpio_test_stm32f3_discovery gpio_test_systimer ... more
stm32f30x_crc.c File Reference
This file provides firmware functions to manage the following functionalities of CRC computation unit peripheral: + Configuration of the CRC computation unit + CRC computation of one/many 32-bit data + CRC Independent register (IDR) access. More...
Go to the source code of this file.
Functions | |
| void | CRC_DeInit (void) |
| Deinitializes CRC peripheral registers to their default reset values. | |
| void | CRC_ResetDR (void) |
| Resets the CRC calculation unit and sets INIT register content in DR register. | |
| void | CRC_PolynomialSizeSelect (uint32_t CRC_PolSize) |
| Selects the polynomial size. | |
| void | CRC_ReverseInputDataSelect (uint32_t CRC_ReverseInputData) |
| Selects the reverse operation to be performed on input data. | |
| void | CRC_ReverseOutputDataCmd (FunctionalState NewState) |
| Enables or disable the reverse operation on output data. | |
| void | CRC_SetInitRegister (uint32_t CRC_InitValue) |
| Initializes the INIT register. | |
| void | CRC_SetPolynomial (uint32_t CRC_Pol) |
| Initializes the polynomial coefficients. | |
| uint32_t | CRC_CalcCRC (uint32_t CRC_Data) |
| Computes the 32-bit CRC of a given data word(32-bit). | |
| uint32_t | CRC_CalcCRC16bits (uint16_t CRC_Data) |
| Computes the 16-bit CRC of a given 16-bit data. | |
| uint32_t | CRC_CalcCRC8bits (uint8_t CRC_Data) |
| Computes the 8-bit CRC of a given 8-bit data. | |
| uint32_t | CRC_CalcBlockCRC (uint32_t pBuffer[], uint32_t BufferLength) |
| Computes the 32-bit CRC of a given buffer of data word(32-bit). | |
| uint32_t | CRC_GetCRC (void) |
| Returns the current CRC value. | |
| void | CRC_SetIDRegister (uint8_t CRC_IDValue) |
| Stores an 8-bit data in the Independent Data(ID) register. | |
| uint8_t | CRC_GetIDRegister (void) |
| Returns the 8-bit data stored in the Independent Data(ID) register. | |
Detailed Description
This file provides firmware functions to manage the following functionalities of CRC computation unit peripheral: + Configuration of the CRC computation unit + CRC computation of one/many 32-bit data + CRC Independent register (IDR) access.
- Version:
- V1.2.3
- Date:
- 10-July-2015
=============================================================================== ##### How to use this driver ##### =============================================================================== [..] (#) Enable CRC AHB clock using RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC, ENABLE) function. (#) Select the polynomial size: 7-bit, 8-bit, 16-bit or 32-bit. (#) Set the polynomial coefficients using CRC_SetPolynomial(); (#) If required, select the reverse operation on input data using CRC_ReverseInputDataSelect(); (#) If required, enable the reverse operation on output data using CRC_ReverseOutputDataCmd(Enable); (#) If required, set the initialization remainder value using CRC_SetInitRegister(); (#) 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.
- Attention:
© COPYRIGHT 2014 STMicroelectronics
Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.st.com/software_license_agreement_liberty_v2
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file stm32f30x_crc.c.
Generated on Tue Jul 12 2022 17:34:45 by
1.7.2