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_Management

Functions

__STATIC_INLINE void LL_SPI_EnableCRC (SPI_TypeDef *SPIx)
 Enable CRC.
__STATIC_INLINE void LL_SPI_DisableCRC (SPI_TypeDef *SPIx)
 Disable CRC.
__STATIC_INLINE void LL_SPI_IsEnabledCRC (SPI_TypeDef *SPIx)
 Check if CRC is enabled.
__STATIC_INLINE void LL_SPI_SetCRCWidth (SPI_TypeDef *SPIx, uint32_t CRCLength)
 Set CRC Length.
__STATIC_INLINE uint32_t LL_SPI_GetCRCWidth (SPI_TypeDef *SPIx)
 Get CRC Length CR1 CRCL LL_SPI_GetCRCWidth.
__STATIC_INLINE void LL_SPI_SetCRCNext (SPI_TypeDef *SPIx)
 Set CRCNext to transfer CRC on the line.
__STATIC_INLINE void LL_SPI_SetCRCPolynomial (SPI_TypeDef *SPIx, uint32_t CRCPoly)
 Set polynomial for CRC calculation CRCPR CRCPOLY LL_SPI_SetCRCPolynomial.
__STATIC_INLINE uint32_t LL_SPI_GetCRCPolynomial (SPI_TypeDef *SPIx)
 Get polynomial for CRC calculation CRCPR CRCPOLY LL_SPI_GetCRCPolynomial.
__STATIC_INLINE uint32_t LL_SPI_GetRxCRC (SPI_TypeDef *SPIx)
 Get Rx CRC RXCRCR RXCRC LL_SPI_GetRxCRC.
__STATIC_INLINE uint32_t LL_SPI_GetTxCRC (SPI_TypeDef *SPIx)
 Get Tx CRC TXCRCR TXCRC LL_SPI_GetTxCRC.

Function Documentation

__STATIC_INLINE void LL_SPI_DisableCRC ( SPI_TypeDef *  SPIx )

Disable CRC.

Note:
This bit should be written only when SPI is disabled (SPE = 0) for correct operation. CR1 CRCEN LL_SPI_DisableCRC
Parameters:
SPIxSPI Instance
Return values:
None

Definition at line 686 of file stm32l4xx_ll_spi.h.

__STATIC_INLINE void LL_SPI_EnableCRC ( SPI_TypeDef *  SPIx )

Enable CRC.

Note:
This bit should be written only when SPI is disabled (SPE = 0) for correct operation. CR1 CRCEN LL_SPI_EnableCRC
Parameters:
SPIxSPI Instance
Return values:
None

Definition at line 674 of file stm32l4xx_ll_spi.h.

__STATIC_INLINE uint32_t LL_SPI_GetCRCPolynomial ( SPI_TypeDef *  SPIx )

Get polynomial for CRC calculation CRCPR CRCPOLY LL_SPI_GetCRCPolynomial.

Parameters:
SPIxSPI Instance
Return values:
0..0xFFFF

Definition at line 760 of file stm32l4xx_ll_spi.h.

__STATIC_INLINE uint32_t LL_SPI_GetCRCWidth ( SPI_TypeDef *  SPIx )

Get CRC Length CR1 CRCL LL_SPI_GetCRCWidth.

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

  • LL_SPI_CRC_8BIT
  • LL_SPI_CRC_16BIT

Definition at line 725 of file stm32l4xx_ll_spi.h.

__STATIC_INLINE uint32_t LL_SPI_GetRxCRC ( SPI_TypeDef *  SPIx )

Get Rx CRC RXCRCR RXCRC LL_SPI_GetRxCRC.

Parameters:
SPIxSPI Instance
Return values:
0..0xFFFF

Definition at line 771 of file stm32l4xx_ll_spi.h.

__STATIC_INLINE uint32_t LL_SPI_GetTxCRC ( SPI_TypeDef *  SPIx )

Get Tx CRC TXCRCR TXCRC LL_SPI_GetTxCRC.

Parameters:
SPIxSPI Instance
Return values:
0..0xFFFF

Definition at line 782 of file stm32l4xx_ll_spi.h.

__STATIC_INLINE void LL_SPI_IsEnabledCRC ( SPI_TypeDef *  SPIx )

Check if CRC is enabled.

Note:
This bit should be written only when SPI is disabled (SPE = 0) for correct operation. CR1 CRCEN LL_SPI_IsEnabledCRC
Parameters:
SPIxSPI Instance
Return values:
None

Definition at line 698 of file stm32l4xx_ll_spi.h.

__STATIC_INLINE void LL_SPI_SetCRCNext ( SPI_TypeDef *  SPIx )

Set CRCNext to transfer CRC on the line.

Note:
This bit has to be written as soon as the last data is written in the SPIx_DR register. CR1 CRCNEXT LL_SPI_SetCRCNext
Parameters:
SPIxSPI Instance
Return values:
None

Definition at line 737 of file stm32l4xx_ll_spi.h.

__STATIC_INLINE void LL_SPI_SetCRCPolynomial ( SPI_TypeDef *  SPIx,
uint32_t  CRCPoly 
)

Set polynomial for CRC calculation CRCPR CRCPOLY LL_SPI_SetCRCPolynomial.

Parameters:
SPIxSPI Instance
CRCPoly0..0xFFFF
Return values:
None

Definition at line 749 of file stm32l4xx_ll_spi.h.

__STATIC_INLINE void LL_SPI_SetCRCWidth ( SPI_TypeDef *  SPIx,
uint32_t  CRCLength 
)

Set CRC Length.

Note:
This bit should be written only when SPI is disabled (SPE = 0) for correct operation. CR1 CRCL LL_SPI_SetCRCWidth
Parameters:
SPIxSPI Instance
CRCLengthThis parameter can be one of the following values:

  • LL_SPI_CRC_8BIT
  • LL_SPI_CRC_16BIT
Return values:
None

Definition at line 712 of file stm32l4xx_ll_spi.h.