Hal Drivers for L4

Dependents:   BSP OneHopeOnePrayer FINAL_AUDIO_RECORD AudioDemo

Fork of STM32L4xx_HAL_Driver by Senior Design: Sound Monitor

Embed: (wiki syntax)

« Back to documentation index

CRC Configuration functions

CRC Configuration functions
[CRC Exported Functions]

Functions

__STATIC_INLINE void LL_CRC_ResetCRCCalculationUnit (CRC_TypeDef *CRCx)
 Reset the CRC calculation unit.
__STATIC_INLINE void LL_CRC_SetPolynomialSize (CRC_TypeDef *CRCx, uint32_t PolySize)
 Configure size of the polynomial.
__STATIC_INLINE uint32_t LL_CRC_GetPolynomialSize (CRC_TypeDef *CRCx)
 Return size of the polynomial.
__STATIC_INLINE void LL_CRC_SetInputDataReverseMode (CRC_TypeDef *CRCx, uint32_t ReverseMode)
 Configure the reversal of the bit order of the input data CR REV_IN LL_CRC_SetInputDataReverseMode.
__STATIC_INLINE uint32_t LL_CRC_GetInputDataReverseMode (CRC_TypeDef *CRCx)
 Return type of reversal for input data bit order CR REV_IN LL_CRC_GetInputDataReverseMode.
__STATIC_INLINE void LL_CRC_SetOutputDataReverseMode (CRC_TypeDef *CRCx, uint32_t ReverseMode)
 Configure the reversal of the bit order of the Output data CR REV_OUT LL_CRC_SetOutputDataReverseMode.
__STATIC_INLINE uint32_t LL_CRC_GetOutputDataReverseMode (CRC_TypeDef *CRCx)
 Configure the reversal of the bit order of the Output data CR REV_OUT LL_CRC_GetOutputDataReverseMode.
__STATIC_INLINE void LL_CRC_SetInitialData (CRC_TypeDef *CRCx, uint32_t InitCrc)
 Initialize the Programmable initial CRC value.
__STATIC_INLINE uint32_t LL_CRC_GetInitialData (CRC_TypeDef *CRCx)
 Return current Initial CRC value.
__STATIC_INLINE void LL_CRC_SetPolynomialCoef (CRC_TypeDef *CRCx, uint32_t PolynomCoef)
 Initialize the Programmable polynomial value (coefficients of the polynomial to be used for CRC calculation).
__STATIC_INLINE uint32_t LL_CRC_GetPolynomialCoef (CRC_TypeDef *CRCx)
 Return current Programmable polynomial value.

Function Documentation

__STATIC_INLINE uint32_t LL_CRC_GetInitialData ( CRC_TypeDef *  CRCx )

Return current Initial CRC value.

Note:
If the CRC size is less than 32 bits, the least significant bits are used to read the correct value INIT INIT LL_CRC_GetInitialData
Parameters:
CRCxCRC Instance
Return values:
Valueprogrammed in Programmable initial CRC value register

Definition at line 293 of file stm32l4xx_ll_crc.h.

__STATIC_INLINE uint32_t LL_CRC_GetInputDataReverseMode ( CRC_TypeDef *  CRCx )

Return type of reversal for input data bit order CR REV_IN LL_CRC_GetInputDataReverseMode.

Parameters:
CRCxCRC Instance
Return values:
Returnedvalue can be one of the following values:

  • LL_CRC_INDATA_REVERSE_NONE
  • LL_CRC_INDATA_REVERSE_BYTE
  • LL_CRC_INDATA_REVERSE_HALFWORD
  • LL_CRC_INDATA_REVERSE_WORD

Definition at line 236 of file stm32l4xx_ll_crc.h.

__STATIC_INLINE uint32_t LL_CRC_GetOutputDataReverseMode ( CRC_TypeDef *  CRCx )

Configure the reversal of the bit order of the Output data CR REV_OUT LL_CRC_GetOutputDataReverseMode.

Parameters:
CRCxCRC Instance
Return values:
Returnedvalue can be one of the following values:

  • LL_CRC_OUTDATA_REVERSE_NONE
  • LL_CRC_OUTDATA_REVERSE_BIT

Definition at line 263 of file stm32l4xx_ll_crc.h.

__STATIC_INLINE uint32_t LL_CRC_GetPolynomialCoef ( CRC_TypeDef *  CRCx )

Return current Programmable polynomial value.

Note:
Please check Reference Manual and existing Errata Sheets, regarding possible limitations for Polynomial values usage. For example, for a polynomial of degree 7, X^7 + X^6 + X^5 + X^2 + 1 is written 0x65 POL POL LL_CRC_GetPolynomialCoef
Parameters:
CRCxCRC Instance
Return values:
Valueprogrammed in Programmable Polynomial value register

Definition at line 325 of file stm32l4xx_ll_crc.h.

__STATIC_INLINE uint32_t LL_CRC_GetPolynomialSize ( CRC_TypeDef *  CRCx )

Return size of the polynomial.

CR POLYSIZE LL_CRC_GetPolynomialSize

Parameters:
CRCxCRC Instance
Return values:
Returnedvalue can be one of the following values:

  • LL_CRC_POLYLENGTH_32B
  • LL_CRC_POLYLENGTH_16B
  • LL_CRC_POLYLENGTH_8B
  • LL_CRC_POLYLENGTH_7B

Definition at line 205 of file stm32l4xx_ll_crc.h.

__STATIC_INLINE void LL_CRC_ResetCRCCalculationUnit ( CRC_TypeDef *  CRCx )

Reset the CRC calculation unit.

Note:
If Programmable Initial CRC value feature is available, also set the Data Register to the value stored in the CRC_INIT register, otherwise, reset Data Register to its default value. CR RESET LL_CRC_ResetCRCCalculationUnit
Parameters:
CRCxCRC Instance
Return values:
None

Definition at line 174 of file stm32l4xx_ll_crc.h.

__STATIC_INLINE void LL_CRC_SetInitialData ( CRC_TypeDef *  CRCx,
uint32_t  InitCrc 
)

Initialize the Programmable initial CRC value.

Note:
If the CRC size is less than 32 bits, the least significant bits are used to write the correct value
LL_CRC_DEFAULT_CRC_INITVALUE could be used as value for InitCrc parameter. INIT INIT LL_CRC_SetInitialData
Parameters:
CRCxCRC Instance
InitCrcValue to be programmed in Programmable initial CRC value register
Return values:
None

Definition at line 279 of file stm32l4xx_ll_crc.h.

__STATIC_INLINE void LL_CRC_SetInputDataReverseMode ( CRC_TypeDef *  CRCx,
uint32_t  ReverseMode 
)

Configure the reversal of the bit order of the input data CR REV_IN LL_CRC_SetInputDataReverseMode.

Parameters:
CRCxCRC Instance
ReverseModeThis parameter can be one of the following values:

  • LL_CRC_INDATA_REVERSE_NONE
  • LL_CRC_INDATA_REVERSE_BYTE
  • LL_CRC_INDATA_REVERSE_HALFWORD
  • LL_CRC_INDATA_REVERSE_WORD
Return values:
None

Definition at line 221 of file stm32l4xx_ll_crc.h.

__STATIC_INLINE void LL_CRC_SetOutputDataReverseMode ( CRC_TypeDef *  CRCx,
uint32_t  ReverseMode 
)

Configure the reversal of the bit order of the Output data CR REV_OUT LL_CRC_SetOutputDataReverseMode.

Parameters:
CRCxCRC Instance
ReverseModeThis parameter can be one of the following values:

  • LL_CRC_OUTDATA_REVERSE_NONE
  • LL_CRC_OUTDATA_REVERSE_BIT
Return values:
None

Definition at line 250 of file stm32l4xx_ll_crc.h.

__STATIC_INLINE void LL_CRC_SetPolynomialCoef ( CRC_TypeDef *  CRCx,
uint32_t  PolynomCoef 
)

Initialize the Programmable polynomial value (coefficients of the polynomial to be used for CRC calculation).

Note:
LL_CRC_DEFAULT_CRC32_POLY could be used as value for PolynomCoef parameter.
Please check Reference Manual and existing Errata Sheets, regarding possible limitations for Polynomial values usage. For example, for a polynomial of degree 7, X^7 + X^6 + X^5 + X^2 + 1 is written 0x65 POL POL LL_CRC_SetPolynomialCoef
Parameters:
CRCxCRC Instance
PolynomCoefValue to be programmed in Programmable Polynomial value register
Return values:
None

Definition at line 311 of file stm32l4xx_ll_crc.h.

__STATIC_INLINE void LL_CRC_SetPolynomialSize ( CRC_TypeDef *  CRCx,
uint32_t  PolySize 
)

Configure size of the polynomial.

CR POLYSIZE LL_CRC_SetPolynomialSize

Parameters:
CRCxCRC Instance
PolySizeThis parameter can be one of the following values:

  • LL_CRC_POLYLENGTH_32B
  • LL_CRC_POLYLENGTH_16B
  • LL_CRC_POLYLENGTH_8B
  • LL_CRC_POLYLENGTH_7B
Return values:
None

Definition at line 190 of file stm32l4xx_ll_crc.h.