STM32F0 Standard Peripheral bibliotheek  1.0
ST Microelectronics standard peripheral bibliotheek documentatie voor de STM32F0 familie
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
stm32f0xx_crc.c File Reference

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

#include "stm32f0xx_crc.h"

Functions

void CRC_DeInit (void)
 Deinitializes CRC peripheral registers to their default reset values. 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_SetInitRegister (uint32_t CRC_InitValue)
 Initializes the INIT register. 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_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_GetCRC (void)
 Returns the current CRC value. More...
 
void CRC_SetIDRegister (uint8_t CRC_IDValue)
 Stores an 8-bit data in the Independent Data(ID) register. More...
 
uint8_t CRC_GetIDRegister (void)
 Returns the 8-bit data stored in the Independent Data(ID) register. More...
 

Detailed Description

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

Author
MCD Application Team
Version
V1.0.1
Date
20-April-2012
  • 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
        (+) 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)
        (+) 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
           (@) To compute the CRC of a new data use CRC_ResetDR() to reset
                the CRC computation unit before starting the computation
                otherwise you can get wrong CRC values.
Attention

© COPYRIGHT 2012 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.