Functions
stm32f30x_crc.c File Reference

This file provides firmware functions to manage the following functionalities of CRC computation unit peripheral: More...

#include "stm32f30x_crc.h"
Include dependency graph for stm32f30x_crc.c:

Go to the source code of this file.

Functions

uint32_t CRC_CalcBlockCRC (uint32_t pBuffer[], uint32_t BufferLength)
 Computes the 32-bit CRC of a given buffer of data word(32-bit). More...
 
uint32_t CRC_CalcCRC (uint32_t CRC_Data)
 Computes the 32-bit CRC of a given data word(32-bit). More...
 
uint32_t CRC_CalcCRC16bits (uint16_t CRC_Data)
 Computes the 16-bit CRC of a given 16-bit data. More...
 
uint32_t CRC_CalcCRC8bits (uint8_t CRC_Data)
 Computes the 8-bit CRC of a given 8-bit data. More...
 
void CRC_DeInit (void)
 Deinitializes CRC peripheral registers to their default reset values. More...
 
uint32_t CRC_GetCRC (void)
 Returns the current CRC value. More...
 
uint8_t CRC_GetIDRegister (void)
 Returns the 8-bit data stored in the Independent Data(ID) register. More...
 
void CRC_PolynomialSizeSelect (uint32_t CRC_PolSize)
 Selects the polynomial size. More...
 
void CRC_ResetDR (void)
 Resets the CRC calculation unit and sets INIT register content in DR register. More...
 
void CRC_ReverseInputDataSelect (uint32_t CRC_ReverseInputData)
 Selects the reverse operation to be performed on input data. More...
 
void CRC_ReverseOutputDataCmd (FunctionalState NewState)
 Enables or disable the reverse operation on output data. The reverse operation on output data is performed on 32-bit. More...
 
void CRC_SetIDRegister (uint8_t CRC_IDValue)
 Stores an 8-bit data in the Independent Data(ID) register. More...
 
void CRC_SetInitRegister (uint32_t CRC_InitValue)
 Initializes the INIT register. More...
 
void CRC_SetPolynomial (uint32_t CRC_Pol)
 Initializes the polynomail coefficients. More...
 

Detailed Description

This file provides firmware functions to manage the following functionalities of CRC computation unit peripheral:

Author
MCD Application Team
Version
V1.1.1
Date
04-April-2014
  • Configuration of the CRC computation unit
  • CRC computation of one/many 32-bit data
  • CRC Independent register (IDR) access
===============================================================================
                     ##### 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.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:27