TUKS MCU Introductory course / TUKS-COURSE-THERMOMETER

Fork of TUKS-COURSE-TIMER by TUKS MCU Introductory course

Embed: (wiki syntax)

« Back to documentation index

Configuration functions

Configuration functions
[LPUART Exported Functions]

Functions

__STATIC_INLINE void LL_LPUART_Enable (USART_TypeDef *LPUARTx)
 LPUART Enable CR1 UE LL_LPUART_Enable.
__STATIC_INLINE void LL_LPUART_Disable (USART_TypeDef *LPUARTx)
 LPUART Disable.
__STATIC_INLINE uint32_t LL_LPUART_IsEnabled (USART_TypeDef *LPUARTx)
 Indicate if LPUART is enabled CR1 UE LL_LPUART_IsEnabled.
__STATIC_INLINE void LL_LPUART_EnableInStopMode (USART_TypeDef *LPUARTx)
 LPUART enabled in STOP Mode.
__STATIC_INLINE void LL_LPUART_DisableInStopMode (USART_TypeDef *LPUARTx)
 LPUART disabled in STOP Mode.
__STATIC_INLINE uint32_t LL_LPUART_IsEnabledInStopMode (USART_TypeDef *LPUARTx)
 Indicate if LPUART is enabled in STOP Mode (able to wake up MCU from Stop mode or not) CR1 UESM LL_LPUART_IsEnabledInStopMode.
__STATIC_INLINE void LL_LPUART_EnableDirectionRx (USART_TypeDef *LPUARTx)
 Receiver Enable (Receiver is enabled and begins searching for a start bit) CR1 RE LL_LPUART_EnableDirectionRx.
__STATIC_INLINE void LL_LPUART_DisableDirectionRx (USART_TypeDef *LPUARTx)
 Receiver Disable CR1 RE LL_LPUART_DisableDirectionRx.
__STATIC_INLINE void LL_LPUART_EnableDirectionTx (USART_TypeDef *LPUARTx)
 Transmitter Enable CR1 TE LL_LPUART_EnableDirectionTx.
__STATIC_INLINE void LL_LPUART_DisableDirectionTx (USART_TypeDef *LPUARTx)
 Transmitter Disable CR1 TE LL_LPUART_DisableDirectionTx.
__STATIC_INLINE void LL_LPUART_SetTransferDirection (USART_TypeDef *LPUARTx, uint32_t TransferDirection)
 Configure simultaneously enabled/disabled states of Transmitter and Receiver CR1 RE LL_LPUART_SetTransferDirection
CR1 TE LL_LPUART_SetTransferDirection.
__STATIC_INLINE uint32_t LL_LPUART_GetTransferDirection (USART_TypeDef *LPUARTx)
 Return enabled/disabled states of Transmitter and Receiver CR1 RE LL_LPUART_GetTransferDirection
CR1 TE LL_LPUART_GetTransferDirection.
__STATIC_INLINE void LL_LPUART_SetParity (USART_TypeDef *LPUARTx, uint32_t Parity)
 Configure Parity (enabled/disabled and parity mode if enabled)
__STATIC_INLINE uint32_t LL_LPUART_GetParity (USART_TypeDef *LPUARTx)
 Return Parity configuration (enabled/disabled and parity mode if enabled) CR1 PS LL_LPUART_GetParity
CR1 PCE LL_LPUART_GetParity.
__STATIC_INLINE void LL_LPUART_SetWakeUpMethod (USART_TypeDef *LPUARTx, uint32_t Method)
 Set Receiver Wake Up method from Mute mode.
__STATIC_INLINE uint32_t LL_LPUART_GetWakeUpMethod (USART_TypeDef *LPUARTx)
 Return Receiver Wake Up method from Mute mode CR1 WAKE LL_LPUART_GetWakeUpMethod.
__STATIC_INLINE void LL_LPUART_SetDataWidth (USART_TypeDef *LPUARTx, uint32_t DataWidth)
 Set Word length (nb of data bits, excluding start and stop bits) CR1 M LL_LPUART_SetDataWidth.
__STATIC_INLINE uint32_t LL_LPUART_GetDataWidth (USART_TypeDef *LPUARTx)
 Return Word length (i.e.
__STATIC_INLINE void LL_LPUART_EnableMuteMode (USART_TypeDef *LPUARTx)
 Allow switch between Mute Mode and Active mode CR1 MME LL_LPUART_EnableMuteMode.
__STATIC_INLINE void LL_LPUART_DisableMuteMode (USART_TypeDef *LPUARTx)
 Prevent Mute Mode use.
__STATIC_INLINE uint32_t LL_LPUART_IsEnabledMuteMode (USART_TypeDef *LPUARTx)
 Indicate if switch between Mute Mode and Active mode is allowed CR1 MME LL_LPUART_IsEnabledMuteMode.
__STATIC_INLINE void LL_LPUART_SetStopBitsLength (USART_TypeDef *LPUARTx, uint32_t StopBits)
 Set the length of the stop bits CR2 STOP LL_LPUART_SetStopBitsLength.
__STATIC_INLINE uint32_t LL_LPUART_GetStopBitsLength (USART_TypeDef *LPUARTx)
 Retrieve the length of the stop bits CR2 STOP LL_LPUART_GetStopBitsLength.
__STATIC_INLINE void LL_LPUART_ConfigCharacter (USART_TypeDef *LPUARTx, uint32_t DataWidth, uint32_t Parity, uint32_t StopBits)
 Configure Character frame format (Datawidth, Parity control, Stop Bits)
__STATIC_INLINE void LL_LPUART_SetTXRXSwap (USART_TypeDef *LPUARTx, uint32_t SwapConfig)
 Configure TX/RX pins swapping setting.
__STATIC_INLINE uint32_t LL_LPUART_GetTXRXSwap (USART_TypeDef *LPUARTx)
 Retrieve TX/RX pins swapping configuration.
__STATIC_INLINE void LL_LPUART_SetRXPinLevel (USART_TypeDef *LPUARTx, uint32_t PinInvMethod)
 Configure RX pin active level logic CR2 RXINV LL_LPUART_SetRXPinLevel.
__STATIC_INLINE uint32_t LL_LPUART_GetRXPinLevel (USART_TypeDef *LPUARTx)
 Retrieve RX pin active level logic configuration CR2 RXINV LL_LPUART_GetRXPinLevel.
__STATIC_INLINE void LL_LPUART_SetTXPinLevel (USART_TypeDef *LPUARTx, uint32_t PinInvMethod)
 Configure TX pin active level logic CR2 TXINV LL_LPUART_SetTXPinLevel.
__STATIC_INLINE uint32_t LL_LPUART_GetTXPinLevel (USART_TypeDef *LPUARTx)
 Retrieve TX pin active level logic configuration CR2 TXINV LL_LPUART_GetTXPinLevel.
__STATIC_INLINE void LL_LPUART_SetBinaryDataLogic (USART_TypeDef *LPUARTx, uint32_t DataLogic)
 Configure Binary data logic.
__STATIC_INLINE uint32_t LL_LPUART_GetBinaryDataLogic (USART_TypeDef *LPUARTx)
 Retrieve Binary data configuration CR2 DATAINV LL_LPUART_GetBinaryDataLogic.
__STATIC_INLINE void LL_LPUART_SetTransferBitOrder (USART_TypeDef *LPUARTx, uint32_t BitOrder)
 Configure transfer bit order (either Less or Most Significant Bit First)
__STATIC_INLINE uint32_t LL_LPUART_GetTransferBitOrder (USART_TypeDef *LPUARTx)
 Return transfer bit order (either Less or Most Significant Bit First)
__STATIC_INLINE void LL_LPUART_ConfigNodeAddress (USART_TypeDef *LPUARTx, uint32_t AddressLen, uint32_t NodeAddress)
 Set Address of the LPUART node.
__STATIC_INLINE uint32_t LL_LPUART_GetNodeAddress (USART_TypeDef *LPUARTx)
 Return 8 bit Address of the LPUART node as set in ADD field of CR2.
__STATIC_INLINE uint32_t LL_LPUART_GetNodeAddressLen (USART_TypeDef *LPUARTx)
 Return Length of Node Address used in Address Detection mode (7-bit or 4-bit) CR2 ADDM7 LL_LPUART_GetNodeAddressLen.
__STATIC_INLINE void LL_LPUART_EnableRTSHWFlowCtrl (USART_TypeDef *LPUARTx)
 Enable RTS HW Flow Control CR3 RTSE LL_LPUART_EnableRTSHWFlowCtrl.
__STATIC_INLINE void LL_LPUART_DisableRTSHWFlowCtrl (USART_TypeDef *LPUARTx)
 Disable RTS HW Flow Control CR3 RTSE LL_LPUART_DisableRTSHWFlowCtrl.
__STATIC_INLINE void LL_LPUART_EnableCTSHWFlowCtrl (USART_TypeDef *LPUARTx)
 Enable CTS HW Flow Control CR3 CTSE LL_LPUART_EnableCTSHWFlowCtrl.
__STATIC_INLINE void LL_LPUART_DisableCTSHWFlowCtrl (USART_TypeDef *LPUARTx)
 Disable CTS HW Flow Control CR3 CTSE LL_LPUART_DisableCTSHWFlowCtrl.
__STATIC_INLINE void LL_LPUART_SetHWFlowCtrl (USART_TypeDef *LPUARTx, uint32_t HardwareFlowControl)
 Configure HW Flow Control mode (both CTS and RTS) CR3 RTSE LL_LPUART_SetHWFlowCtrl
CR3 CTSE LL_LPUART_SetHWFlowCtrl.
__STATIC_INLINE uint32_t LL_LPUART_GetHWFlowCtrl (USART_TypeDef *LPUARTx)
 Return HW Flow Control configuration (both CTS and RTS) CR3 RTSE LL_LPUART_GetHWFlowCtrl
CR3 CTSE LL_LPUART_GetHWFlowCtrl.
__STATIC_INLINE void LL_LPUART_EnableOverrunDetect (USART_TypeDef *LPUARTx)
 Enable Overrun detection CR3 OVRDIS LL_LPUART_EnableOverrunDetect.
__STATIC_INLINE void LL_LPUART_DisableOverrunDetect (USART_TypeDef *LPUARTx)
 Disable Overrun detection CR3 OVRDIS LL_LPUART_DisableOverrunDetect.
__STATIC_INLINE uint32_t LL_LPUART_IsEnabledOverrunDetect (USART_TypeDef *LPUARTx)
 Indicate if Overrun detection is enabled CR3 OVRDIS LL_LPUART_IsEnabledOverrunDetect.
__STATIC_INLINE void LL_LPUART_SetWKUPType (USART_TypeDef *LPUARTx, uint32_t Type)
 Select event type for Wake UP Interrupt Flag (WUS[1:0] bits) CR3 WUS LL_LPUART_SetWKUPType.
__STATIC_INLINE uint32_t LL_LPUART_GetWKUPType (USART_TypeDef *LPUARTx)
 Return event type for Wake UP Interrupt Flag (WUS[1:0] bits) CR3 WUS LL_LPUART_GetWKUPType.
__STATIC_INLINE void LL_LPUART_SetBaudRate (USART_TypeDef *LPUARTx, uint32_t PeriphClk, uint32_t BaudRate)
 Configure LPUART BRR register for achieving expected Baud Rate value.
__STATIC_INLINE uint32_t LL_LPUART_GetBaudRate (USART_TypeDef *LPUARTx, uint32_t PeriphClk)
 Return current Baud Rate value, according to LPUARTDIV present in BRR register (full BRR content), and to used Peripheral Clock values.

Function Documentation

__STATIC_INLINE void LL_LPUART_ConfigCharacter ( USART_TypeDef *  LPUARTx,
uint32_t  DataWidth,
uint32_t  Parity,
uint32_t  StopBits 
)

Configure Character frame format (Datawidth, Parity control, Stop Bits)

Note:
Call of this function is equivalent to following function call sequence :
Parameters:
LPUARTxLPUART Instance
DataWidthThis parameter can be one of the following values:

  • LL_LPUART_DATAWIDTH_7B
  • LL_LPUART_DATAWIDTH_8B
  • LL_LPUART_DATAWIDTH_9B
ParityThis parameter can be one of the following values:

  • LL_LPUART_PARITY_NONE
  • LL_LPUART_PARITY_EVEN
  • LL_LPUART_PARITY_ODD
StopBitsThis parameter can be one of the following values:

  • LL_LPUART_STOPBITS_1
  • LL_LPUART_STOPBITS_2
Return values:
None

Definition at line 737 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_ConfigNodeAddress ( USART_TypeDef *  LPUARTx,
uint32_t  AddressLen,
uint32_t  NodeAddress 
)

Set Address of the LPUART node.

Note:
This is used in multiprocessor communication during Mute mode or Stop mode, for wake up with address mark detection.
4bits address node is used when 4-bit Address Detection is selected in ADDM7. (b7-b4 should be set to 0) 8bits address node is used when 7-bit Address Detection is selected in ADDM7. (This is used in multiprocessor communication during Mute mode or Stop mode, for wake up with 7-bit address mark detection. The MSB of the character sent by the transmitter should be equal to 1. It may also be used for character detection during normal reception, Mute mode inactive (for example, end of block detection in ModBus protocol). In this case, the whole received character (8-bit) is compared to the ADD[7:0] value and CMF flag is set on match) CR2 ADD LL_LPUART_ConfigNodeAddress
CR2 ADDM7 LL_LPUART_ConfigNodeAddress
Parameters:
LPUARTxLPUART Instance
AddressLenThis parameter can be one of the following values:

  • LL_LPUART_ADDRESS_DETECT_4B
  • LL_LPUART_ADDRESS_DETECT_7B
NodeAddress4 or 7 bit Address of the LPUART node.
Return values:
None

Definition at line 909 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_Disable ( USART_TypeDef *  LPUARTx )

LPUART Disable.

Note:
When LPUART is disabled, LPUART prescalers and outputs are stopped immediately, and current operations are discarded. The configuration of the LPUART is kept, but all the status flags, in the LPUARTx_ISR are set to their default values.
In order to go into low-power mode without generating errors on the line, the TE bit must be reset before and the software must wait for the TC bit in the LPUART_ISR to be set before resetting the UE bit. The DMA requests are also reset when UE = 0 so the DMA channel must be disabled before resetting the UE bit. CR1 UE LL_LPUART_Disable
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 432 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableCTSHWFlowCtrl ( USART_TypeDef *  LPUARTx )

Disable CTS HW Flow Control CR3 CTSE LL_LPUART_DisableCTSHWFlowCtrl.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 982 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableDirectionRx ( USART_TypeDef *  LPUARTx )

Receiver Disable CR1 RE LL_LPUART_DisableDirectionRx.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 502 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableDirectionTx ( USART_TypeDef *  LPUARTx )

Transmitter Disable CR1 TE LL_LPUART_DisableDirectionTx.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 524 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableInStopMode ( USART_TypeDef *  LPUARTx )

LPUART disabled in STOP Mode.

Note:
When this function is disabled, LPUART is not able to wake up the MCU from Stop mode CR1 UESM LL_LPUART_DisableInStopMode
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 468 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableMuteMode ( USART_TypeDef *  LPUARTx )

Prevent Mute Mode use.

Set Receiver in active mode permanently. CR1 MME LL_LPUART_DisableMuteMode

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 670 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableOverrunDetect ( USART_TypeDef *  LPUARTx )

Disable Overrun detection CR3 OVRDIS LL_LPUART_DisableOverrunDetect.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 1037 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableRTSHWFlowCtrl ( USART_TypeDef *  LPUARTx )

Disable RTS HW Flow Control CR3 RTSE LL_LPUART_DisableRTSHWFlowCtrl.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 960 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_Enable ( USART_TypeDef *  LPUARTx )

LPUART Enable CR1 UE LL_LPUART_Enable.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 413 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableCTSHWFlowCtrl ( USART_TypeDef *  LPUARTx )

Enable CTS HW Flow Control CR3 CTSE LL_LPUART_EnableCTSHWFlowCtrl.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 971 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableDirectionRx ( USART_TypeDef *  LPUARTx )

Receiver Enable (Receiver is enabled and begins searching for a start bit) CR1 RE LL_LPUART_EnableDirectionRx.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 491 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableDirectionTx ( USART_TypeDef *  LPUARTx )

Transmitter Enable CR1 TE LL_LPUART_EnableDirectionTx.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 513 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableInStopMode ( USART_TypeDef *  LPUARTx )

LPUART enabled in STOP Mode.

Note:
When this function is enabled, LPUART is able to wake up the MCU from Stop mode, provided that LPUART clock selection is HSI or LSE in RCC. CR1 UESM LL_LPUART_EnableInStopMode
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 456 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableMuteMode ( USART_TypeDef *  LPUARTx )

Allow switch between Mute Mode and Active mode CR1 MME LL_LPUART_EnableMuteMode.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 659 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableOverrunDetect ( USART_TypeDef *  LPUARTx )

Enable Overrun detection CR3 OVRDIS LL_LPUART_EnableOverrunDetect.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 1026 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableRTSHWFlowCtrl ( USART_TypeDef *  LPUARTx )

Enable RTS HW Flow Control CR3 RTSE LL_LPUART_EnableRTSHWFlowCtrl.

Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 949 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetBaudRate ( USART_TypeDef *  LPUARTx,
uint32_t  PeriphClk 
)

Return current Baud Rate value, according to LPUARTDIV present in BRR register (full BRR content), and to used Peripheral Clock values.

Note:
In case of non-initialized or invalid value stored in BRR register, value 0 will be returned. BRR BRR LL_LPUART_GetBaudRate
Parameters:
LPUARTxLPUART Instance
PeriphClkPeripheral Clock
Return values:
BaudRate

Definition at line 1112 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetBinaryDataLogic ( USART_TypeDef *  LPUARTx )

Retrieve Binary data configuration CR2 DATAINV LL_LPUART_GetBinaryDataLogic.

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

  • LL_LPUART_BINARY_LOGIC_POSITIVE
  • LL_LPUART_BINARY_LOGIC_NEGATIVE

Definition at line 850 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetDataWidth ( USART_TypeDef *  LPUARTx )

Return Word length (i.e.

nb of data bits, excluding start and stop bits) CR1 M LL_LPUART_GetDataWidth

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

  • LL_LPUART_DATAWIDTH_7B
  • LL_LPUART_DATAWIDTH_8B
  • LL_LPUART_DATAWIDTH_9B

Definition at line 648 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetHWFlowCtrl ( USART_TypeDef *  LPUARTx )

Return HW Flow Control configuration (both CTS and RTS) CR3 RTSE LL_LPUART_GetHWFlowCtrl
CR3 CTSE LL_LPUART_GetHWFlowCtrl.

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

  • LL_LPUART_HWCONTROL_NONE
  • LL_LPUART_HWCONTROL_RTS
  • LL_LPUART_HWCONTROL_CTS
  • LL_LPUART_HWCONTROL_RTS_CTS

Definition at line 1015 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetNodeAddress ( USART_TypeDef *  LPUARTx )

Return 8 bit Address of the LPUART node as set in ADD field of CR2.

Note:
If 4-bit Address Detection is selected in ADDM7, only 4bits (b3-b0) of returned value are relevant (b31-b4 are not relevant) If 7-bit Address Detection is selected in ADDM7, only 8bits (b7-b0) of returned value are relevant (b31-b8 are not relevant) CR2 ADD LL_LPUART_GetNodeAddress
Parameters:
LPUARTxLPUART Instance
Return values:
Addressof the LPUART node (Value between Min_Data=0 and Max_Data=255)

Definition at line 925 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetNodeAddressLen ( USART_TypeDef *  LPUARTx )

Return Length of Node Address used in Address Detection mode (7-bit or 4-bit) CR2 ADDM7 LL_LPUART_GetNodeAddressLen.

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

  • LL_LPUART_ADDRESS_DETECT_4B
  • LL_LPUART_ADDRESS_DETECT_7B

Definition at line 938 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetParity ( USART_TypeDef *  LPUARTx )

Return Parity configuration (enabled/disabled and parity mode if enabled) CR1 PS LL_LPUART_GetParity
CR1 PCE LL_LPUART_GetParity.

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

  • LL_LPUART_PARITY_NONE
  • LL_LPUART_PARITY_EVEN
  • LL_LPUART_PARITY_ODD

Definition at line 592 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetRXPinLevel ( USART_TypeDef *  LPUARTx )

Retrieve RX pin active level logic configuration CR2 RXINV LL_LPUART_GetRXPinLevel.

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

  • LL_LPUART_RXPIN_LEVEL_STANDARD
  • LL_LPUART_RXPIN_LEVEL_INVERTED

Definition at line 793 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetStopBitsLength ( USART_TypeDef *  LPUARTx )

Retrieve the length of the stop bits CR2 STOP LL_LPUART_GetStopBitsLength.

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

  • LL_LPUART_STOPBITS_1
  • LL_LPUART_STOPBITS_2

Definition at line 708 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetTransferBitOrder ( USART_TypeDef *  LPUARTx )

Return transfer bit order (either Less or Most Significant Bit First)

Note:
MSB First means data is transmitted/received with the MSB first, following the start bit. LSB First means data is transmitted/received with data bit 0 first, following the start bit. CR2 MSBFIRST LL_LPUART_GetTransferBitOrder
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

  • LL_LPUART_BITORDER_LSBFIRST
  • LL_LPUART_BITORDER_MSBFIRST

Definition at line 881 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetTransferDirection ( USART_TypeDef *  LPUARTx )

Return enabled/disabled states of Transmitter and Receiver CR1 RE LL_LPUART_GetTransferDirection
CR1 TE LL_LPUART_GetTransferDirection.

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

  • LL_LPUART_DIRECTION_NONE
  • LL_LPUART_DIRECTION_RX
  • LL_LPUART_DIRECTION_TX
  • LL_LPUART_DIRECTION_TX_RX

Definition at line 558 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetTXPinLevel ( USART_TypeDef *  LPUARTx )

Retrieve TX pin active level logic configuration CR2 TXINV LL_LPUART_GetTXPinLevel.

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

  • LL_LPUART_TXPIN_LEVEL_STANDARD
  • LL_LPUART_TXPIN_LEVEL_INVERTED

Definition at line 820 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetTXRXSwap ( USART_TypeDef *  LPUARTx )

Retrieve TX/RX pins swapping configuration.

CR2 SWAP LL_LPUART_GetTXRXSwap

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

  • LL_LPUART_TXRX_STANDARD
  • LL_LPUART_TXRX_SWAPPED

Definition at line 766 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetWakeUpMethod ( USART_TypeDef *  LPUARTx )

Return Receiver Wake Up method from Mute mode CR1 WAKE LL_LPUART_GetWakeUpMethod.

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

  • LL_LPUART_WAKEUP_IDLELINE
  • LL_LPUART_WAKEUP_ADDRESSMARK

Definition at line 619 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetWKUPType ( USART_TypeDef *  LPUARTx )

Return event type for Wake UP Interrupt Flag (WUS[1:0] bits) CR3 WUS LL_LPUART_GetWKUPType.

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

  • LL_LPUART_WAKEUP_ON_ADDRESS
  • LL_LPUART_WAKEUP_ON_STARTBIT
  • LL_LPUART_WAKEUP_ON_RXNE

Definition at line 1077 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_IsEnabled ( USART_TypeDef *  LPUARTx )

Indicate if LPUART is enabled CR1 UE LL_LPUART_IsEnabled.

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

Definition at line 443 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_IsEnabledInStopMode ( USART_TypeDef *  LPUARTx )

Indicate if LPUART is enabled in STOP Mode (able to wake up MCU from Stop mode or not) CR1 UESM LL_LPUART_IsEnabledInStopMode.

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

Definition at line 480 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_IsEnabledMuteMode ( USART_TypeDef *  LPUARTx )

Indicate if switch between Mute Mode and Active mode is allowed CR1 MME LL_LPUART_IsEnabledMuteMode.

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

Definition at line 681 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_IsEnabledOverrunDetect ( USART_TypeDef *  LPUARTx )

Indicate if Overrun detection is enabled CR3 OVRDIS LL_LPUART_IsEnabledOverrunDetect.

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

Definition at line 1048 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetBaudRate ( USART_TypeDef *  LPUARTx,
uint32_t  PeriphClk,
uint32_t  BaudRate 
)

Configure LPUART BRR register for achieving expected Baud Rate value.

Note:
Compute and set LPUARTDIV value in BRR Register (full BRR content) according to used Peripheral Clock and expected Baud Rate values
Peripheral clock and Baud Rate values provided as function parameters should be valid (Baud rate value != 0).
Provided that LPUARTx_BRR must be > = 0x300 and LPUART_BRR is 20-bit, a care should be taken when generating high baud rates using high PeriphClk values. PeriphClk must be in the range [3 x BaudRate, 4096 x BaudRate]. BRR BRR LL_LPUART_SetBaudRate
Parameters:
LPUARTxLPUART Instance
PeriphClkPeripheral Clock
BaudRateBaud Rate
Return values:
None

Definition at line 1098 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetBinaryDataLogic ( USART_TypeDef *  LPUARTx,
uint32_t  DataLogic 
)

Configure Binary data logic.

Note:
Allow to define how Logical data from the data register are send/received : either in positive/direct logic (1=H, 0=L) or in negative/inverse logic (1=L, 0=H) CR2 DATAINV LL_LPUART_SetBinaryDataLogic
Parameters:
LPUARTxLPUART Instance
DataLogicThis parameter can be one of the following values:

  • LL_LPUART_BINARY_LOGIC_POSITIVE
  • LL_LPUART_BINARY_LOGIC_NEGATIVE
Return values:
None

Definition at line 837 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetDataWidth ( USART_TypeDef *  LPUARTx,
uint32_t  DataWidth 
)

Set Word length (nb of data bits, excluding start and stop bits) CR1 M LL_LPUART_SetDataWidth.

Parameters:
LPUARTxLPUART Instance
DataWidthThis parameter can be one of the following values:

  • LL_LPUART_DATAWIDTH_7B
  • LL_LPUART_DATAWIDTH_8B
  • LL_LPUART_DATAWIDTH_9B
Return values:
None

Definition at line 634 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetHWFlowCtrl ( USART_TypeDef *  LPUARTx,
uint32_t  HardwareFlowControl 
)

Configure HW Flow Control mode (both CTS and RTS) CR3 RTSE LL_LPUART_SetHWFlowCtrl
CR3 CTSE LL_LPUART_SetHWFlowCtrl.

Parameters:
LPUARTxLPUART Instance
HardwareFlowControlThis parameter can be one of the following values:

  • LL_LPUART_HWCONTROL_NONE
  • LL_LPUART_HWCONTROL_RTS
  • LL_LPUART_HWCONTROL_CTS
  • LL_LPUART_HWCONTROL_RTS_CTS
Return values:
None

Definition at line 999 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetParity ( USART_TypeDef *  LPUARTx,
uint32_t  Parity 
)

Configure Parity (enabled/disabled and parity mode if enabled)

Note:
This function selects if hardware parity control (generation and detection) is enabled or disabled. When the parity control is enabled (Odd or Even), computed parity bit is inserted at the MSB position (depending on data width) and parity is checked on the received data. CR1 PS LL_LPUART_SetParity
CR1 PCE LL_LPUART_SetParity
Parameters:
LPUARTxLPUART Instance
ParityThis parameter can be one of the following values:

  • LL_LPUART_PARITY_NONE
  • LL_LPUART_PARITY_EVEN
  • LL_LPUART_PARITY_ODD
Return values:
None

Definition at line 577 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetRXPinLevel ( USART_TypeDef *  LPUARTx,
uint32_t  PinInvMethod 
)

Configure RX pin active level logic CR2 RXINV LL_LPUART_SetRXPinLevel.

Parameters:
LPUARTxLPUART Instance
PinInvMethodThis parameter can be one of the following values:

  • LL_LPUART_RXPIN_LEVEL_STANDARD
  • LL_LPUART_RXPIN_LEVEL_INVERTED
Return values:
None

Definition at line 780 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetStopBitsLength ( USART_TypeDef *  LPUARTx,
uint32_t  StopBits 
)

Set the length of the stop bits CR2 STOP LL_LPUART_SetStopBitsLength.

Parameters:
LPUARTxLPUART Instance
StopBitsThis parameter can be one of the following values:

  • LL_LPUART_STOPBITS_1
  • LL_LPUART_STOPBITS_2
Return values:
None

Definition at line 695 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetTransferBitOrder ( USART_TypeDef *  LPUARTx,
uint32_t  BitOrder 
)

Configure transfer bit order (either Less or Most Significant Bit First)

Note:
MSB First means data is transmitted/received with the MSB first, following the start bit. LSB First means data is transmitted/received with data bit 0 first, following the start bit. CR2 MSBFIRST LL_LPUART_SetTransferBitOrder
Parameters:
LPUARTxLPUART Instance
BitOrderThis parameter can be one of the following values:

  • LL_LPUART_BITORDER_LSBFIRST
  • LL_LPUART_BITORDER_MSBFIRST
Return values:
None

Definition at line 866 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetTransferDirection ( USART_TypeDef *  LPUARTx,
uint32_t  TransferDirection 
)

Configure simultaneously enabled/disabled states of Transmitter and Receiver CR1 RE LL_LPUART_SetTransferDirection
CR1 TE LL_LPUART_SetTransferDirection.

Parameters:
LPUARTxLPUART Instance
TransferDirectionThis parameter can be one of the following values:

  • LL_LPUART_DIRECTION_NONE
  • LL_LPUART_DIRECTION_RX
  • LL_LPUART_DIRECTION_TX
  • LL_LPUART_DIRECTION_TX_RX
Return values:
None

Definition at line 542 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetTXPinLevel ( USART_TypeDef *  LPUARTx,
uint32_t  PinInvMethod 
)

Configure TX pin active level logic CR2 TXINV LL_LPUART_SetTXPinLevel.

Parameters:
LPUARTxLPUART Instance
PinInvMethodThis parameter can be one of the following values:

  • LL_LPUART_TXPIN_LEVEL_STANDARD
  • LL_LPUART_TXPIN_LEVEL_INVERTED
Return values:
None

Definition at line 807 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetTXRXSwap ( USART_TypeDef *  LPUARTx,
uint32_t  SwapConfig 
)

Configure TX/RX pins swapping setting.

CR2 SWAP LL_LPUART_SetTXRXSwap

Parameters:
LPUARTxLPUART Instance
SwapConfigThis parameter can be one of the following values:

  • LL_LPUART_TXRX_STANDARD
  • LL_LPUART_TXRX_SWAPPED
Return values:
None

Definition at line 753 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetWakeUpMethod ( USART_TypeDef *  LPUARTx,
uint32_t  Method 
)

Set Receiver Wake Up method from Mute mode.

CR1 WAKE LL_LPUART_SetWakeUpMethod

Parameters:
LPUARTxLPUART Instance
MethodThis parameter can be one of the following values:

  • LL_LPUART_WAKEUP_IDLELINE
  • LL_LPUART_WAKEUP_ADDRESSMARK
Return values:
None

Definition at line 606 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetWKUPType ( USART_TypeDef *  LPUARTx,
uint32_t  Type 
)

Select event type for Wake UP Interrupt Flag (WUS[1:0] bits) CR3 WUS LL_LPUART_SetWKUPType.

Parameters:
LPUARTxLPUART Instance
TypeThis parameter can be one of the following values:

  • LL_LPUART_WAKEUP_ON_ADDRESS
  • LL_LPUART_WAKEUP_ON_STARTBIT
  • LL_LPUART_WAKEUP_ON_RXNE
Return values:
None

Definition at line 1063 of file stm32l4xx_ll_lpuart.h.