STM32L4xx_HAL_Driver  1.14.0

Functions

__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_RXNE (SPI_TypeDef *SPIx)
 Check if Rx buffer is not empty SR RXNE LL_SPI_IsActiveFlag_RXNE. More...
 
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_TXE (SPI_TypeDef *SPIx)
 Check if Tx buffer is empty SR TXE LL_SPI_IsActiveFlag_TXE. More...
 
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_CRCERR (SPI_TypeDef *SPIx)
 Get CRC error flag SR CRCERR LL_SPI_IsActiveFlag_CRCERR. More...
 
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_MODF (SPI_TypeDef *SPIx)
 Get mode fault error flag SR MODF LL_SPI_IsActiveFlag_MODF. More...
 
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_OVR (SPI_TypeDef *SPIx)
 Get overrun error flag SR OVR LL_SPI_IsActiveFlag_OVR. More...
 
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_BSY (SPI_TypeDef *SPIx)
 Get busy flag. More...
 
__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_FRE (SPI_TypeDef *SPIx)
 Get frame format error flag SR FRE LL_SPI_IsActiveFlag_FRE. More...
 
__STATIC_INLINE uint32_t LL_SPI_GetRxFIFOLevel (SPI_TypeDef *SPIx)
 Get FIFO reception Level SR FRLVL LL_SPI_GetRxFIFOLevel. More...
 
__STATIC_INLINE uint32_t LL_SPI_GetTxFIFOLevel (SPI_TypeDef *SPIx)
 Get FIFO Transmission Level SR FTLVL LL_SPI_GetTxFIFOLevel. More...
 
__STATIC_INLINE void LL_SPI_ClearFlag_CRCERR (SPI_TypeDef *SPIx)
 Clear CRC error flag SR CRCERR LL_SPI_ClearFlag_CRCERR. More...
 
__STATIC_INLINE void LL_SPI_ClearFlag_MODF (SPI_TypeDef *SPIx)
 Clear mode fault error flag. More...
 
__STATIC_INLINE void LL_SPI_ClearFlag_OVR (SPI_TypeDef *SPIx)
 Clear overrun error flag. More...
 
__STATIC_INLINE void LL_SPI_ClearFlag_FRE (SPI_TypeDef *SPIx)
 Clear frame format error flag. More...
 

Detailed Description

Function Documentation

◆ LL_SPI_ClearFlag_CRCERR()

__STATIC_INLINE void LL_SPI_ClearFlag_CRCERR ( SPI_TypeDef *  SPIx)

Clear CRC error flag SR CRCERR LL_SPI_ClearFlag_CRCERR.

Parameters
SPIxSPI Instance
Return values
None

Definition at line 1020 of file stm32l4xx_ll_spi.h.

1021 {
1022  CLEAR_BIT(SPIx->SR, SPI_SR_CRCERR);
1023 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_SPI_ClearFlag_FRE()

__STATIC_INLINE void LL_SPI_ClearFlag_FRE ( SPI_TypeDef *  SPIx)

Clear frame format error flag.

Note
Clearing this flag is done by reading SPIx_SR register SR FRE LL_SPI_ClearFlag_FRE
Parameters
SPIxSPI Instance
Return values
None

Definition at line 1065 of file stm32l4xx_ll_spi.h.

1066 {
1067  __IO uint32_t tmpreg;
1068  tmpreg = SPIx->SR;
1069  (void) tmpreg;
1070 }

◆ LL_SPI_ClearFlag_MODF()

__STATIC_INLINE void LL_SPI_ClearFlag_MODF ( SPI_TypeDef *  SPIx)

Clear mode fault error flag.

Note
Clearing this flag is done by a read access to the SPIx_SR register followed by a write access to the SPIx_CR1 register SR MODF LL_SPI_ClearFlag_MODF
Parameters
SPIxSPI Instance
Return values
None

Definition at line 1033 of file stm32l4xx_ll_spi.h.

1034 {
1035  __IO uint32_t tmpreg_sr;
1036  tmpreg_sr = SPIx->SR;
1037  (void) tmpreg_sr;
1038  CLEAR_BIT(SPIx->CR1, SPI_CR1_SPE);
1039 }
CLEAR_BIT(hrtc->Instance->CR, RTC_CR_WUTE)

◆ LL_SPI_ClearFlag_OVR()

__STATIC_INLINE void LL_SPI_ClearFlag_OVR ( SPI_TypeDef *  SPIx)

Clear overrun error flag.

Note
Clearing this flag is done by a read access to the SPIx_DR register followed by a read access to the SPIx_SR register SR OVR LL_SPI_ClearFlag_OVR
Parameters
SPIxSPI Instance
Return values
None

Definition at line 1049 of file stm32l4xx_ll_spi.h.

1050 {
1051  __IO uint32_t tmpreg;
1052  tmpreg = SPIx->DR;
1053  (void) tmpreg;
1054  tmpreg = SPIx->SR;
1055  (void) tmpreg;
1056 }

◆ LL_SPI_GetRxFIFOLevel()

__STATIC_INLINE uint32_t LL_SPI_GetRxFIFOLevel ( SPI_TypeDef *  SPIx)

Get FIFO reception Level SR FRLVL LL_SPI_GetRxFIFOLevel.

Parameters
SPIxSPI Instance
Return values
Returnedvalue can be one of the following values:
  • LL_SPI_RX_FIFO_EMPTY
  • LL_SPI_RX_FIFO_QUARTER_FULL
  • LL_SPI_RX_FIFO_HALF_FULL
  • LL_SPI_RX_FIFO_FULL

Definition at line 994 of file stm32l4xx_ll_spi.h.

995 {
996  return (uint32_t)(READ_BIT(SPIx->SR, SPI_SR_FRLVL));
997 }

◆ LL_SPI_GetTxFIFOLevel()

__STATIC_INLINE uint32_t LL_SPI_GetTxFIFOLevel ( SPI_TypeDef *  SPIx)

Get FIFO Transmission Level SR FTLVL LL_SPI_GetTxFIFOLevel.

Parameters
SPIxSPI Instance
Return values
Returnedvalue can be one of the following values:
  • LL_SPI_TX_FIFO_EMPTY
  • LL_SPI_TX_FIFO_QUARTER_FULL
  • LL_SPI_TX_FIFO_HALF_FULL
  • LL_SPI_TX_FIFO_FULL

Definition at line 1009 of file stm32l4xx_ll_spi.h.

1010 {
1011  return (uint32_t)(READ_BIT(SPIx->SR, SPI_SR_FTLVL));
1012 }

◆ LL_SPI_IsActiveFlag_BSY()

__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_BSY ( SPI_TypeDef *  SPIx)

Get busy flag.

Note
The BSY flag is cleared under any one of the following conditions: -When the SPI is correctly disabled -When a fault is detected in Master mode (MODF bit set to 1) -In Master mode, when it finishes a data transmission and no new data is ready to be sent -In Slave mode, when the BSY flag is set to '0' for at least one SPI clock cycle between each data transfer. SR BSY LL_SPI_IsActiveFlag_BSY
Parameters
SPIxSPI Instance
Return values
Stateof bit (1 or 0).

Definition at line 968 of file stm32l4xx_ll_spi.h.

969 {
970  return ((READ_BIT(SPIx->SR, SPI_SR_BSY) == (SPI_SR_BSY)) ? 1UL : 0UL);
971 }

◆ LL_SPI_IsActiveFlag_CRCERR()

__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_CRCERR ( SPI_TypeDef *  SPIx)

Get CRC error flag SR CRCERR LL_SPI_IsActiveFlag_CRCERR.

Parameters
SPIxSPI Instance
Return values
Stateof bit (1 or 0).

Definition at line 928 of file stm32l4xx_ll_spi.h.

929 {
930  return ((READ_BIT(SPIx->SR, SPI_SR_CRCERR) == (SPI_SR_CRCERR)) ? 1UL : 0UL);
931 }

◆ LL_SPI_IsActiveFlag_FRE()

__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_FRE ( SPI_TypeDef *  SPIx)

Get frame format error flag SR FRE LL_SPI_IsActiveFlag_FRE.

Parameters
SPIxSPI Instance
Return values
Stateof bit (1 or 0).

Definition at line 979 of file stm32l4xx_ll_spi.h.

980 {
981  return ((READ_BIT(SPIx->SR, SPI_SR_FRE) == (SPI_SR_FRE)) ? 1UL : 0UL);
982 }

◆ LL_SPI_IsActiveFlag_MODF()

__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_MODF ( SPI_TypeDef *  SPIx)

Get mode fault error flag SR MODF LL_SPI_IsActiveFlag_MODF.

Parameters
SPIxSPI Instance
Return values
Stateof bit (1 or 0).

Definition at line 939 of file stm32l4xx_ll_spi.h.

940 {
941  return ((READ_BIT(SPIx->SR, SPI_SR_MODF) == (SPI_SR_MODF)) ? 1UL : 0UL);
942 }

◆ LL_SPI_IsActiveFlag_OVR()

__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_OVR ( SPI_TypeDef *  SPIx)

Get overrun error flag SR OVR LL_SPI_IsActiveFlag_OVR.

Parameters
SPIxSPI Instance
Return values
Stateof bit (1 or 0).

Definition at line 950 of file stm32l4xx_ll_spi.h.

951 {
952  return ((READ_BIT(SPIx->SR, SPI_SR_OVR) == (SPI_SR_OVR)) ? 1UL : 0UL);
953 }

◆ LL_SPI_IsActiveFlag_RXNE()

__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_RXNE ( SPI_TypeDef *  SPIx)

Check if Rx buffer is not empty SR RXNE LL_SPI_IsActiveFlag_RXNE.

Parameters
SPIxSPI Instance
Return values
Stateof bit (1 or 0).

Definition at line 906 of file stm32l4xx_ll_spi.h.

907 {
908  return ((READ_BIT(SPIx->SR, SPI_SR_RXNE) == (SPI_SR_RXNE)) ? 1UL : 0UL);
909 }

◆ LL_SPI_IsActiveFlag_TXE()

__STATIC_INLINE uint32_t LL_SPI_IsActiveFlag_TXE ( SPI_TypeDef *  SPIx)

Check if Tx buffer is empty SR TXE LL_SPI_IsActiveFlag_TXE.

Parameters
SPIxSPI Instance
Return values
Stateof bit (1 or 0).

Definition at line 917 of file stm32l4xx_ll_spi.h.

918 {
919  return ((READ_BIT(SPIx->SR, SPI_SR_TXE) == (SPI_SR_TXE)) ? 1UL : 0UL);
920 }