STM32L486xx HAL User Manual
Functions
Configuration functions
LPUART Exported Functions

Functions

__STATIC_INLINE void LL_LPUART_Enable (USART_TypeDef *LPUARTx)
 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.
__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)
__STATIC_INLINE void LL_LPUART_EnableClockInStopMode (USART_TypeDef *LPUARTx)
 LPUART Clock enabled in STOP Mode.
__STATIC_INLINE void LL_LPUART_DisableClockInStopMode (USART_TypeDef *LPUARTx)
 LPUART clock disabled in STOP Mode.
__STATIC_INLINE uint32_t LL_LPUART_IsClockEnabledInStopMode (USART_TypeDef *LPUARTx)
 Indicate if LPUART clock is enabled in STOP Mode.
__STATIC_INLINE void LL_LPUART_EnableDirectionRx (USART_TypeDef *LPUARTx)
 Receiver Enable (Receiver is enabled and begins searching for a start bit)
__STATIC_INLINE void LL_LPUART_DisableDirectionRx (USART_TypeDef *LPUARTx)
 Receiver Disable.
__STATIC_INLINE void LL_LPUART_EnableDirectionTx (USART_TypeDef *LPUARTx)
 Transmitter Enable.
__STATIC_INLINE void LL_LPUART_DisableDirectionTx (USART_TypeDef *LPUARTx)
 Transmitter Disable.
__STATIC_INLINE void LL_LPUART_SetTransferDirection (USART_TypeDef *LPUARTx, uint32_t TransferDirection)
 Configure simultaneously enabled/disabled states of Transmitter and Receiver.
__STATIC_INLINE uint32_t LL_LPUART_GetTransferDirection (USART_TypeDef *LPUARTx)
 Return enabled/disabled states of Transmitter and Receiver.
__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)
__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.
__STATIC_INLINE void LL_LPUART_SetDataWidth (USART_TypeDef *LPUARTx, uint32_t DataWidth)
 Set Word length (nb of data bits, excluding start and stop bits)
__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.
__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.
__STATIC_INLINE void LL_LPUART_SetStopBitsLength (USART_TypeDef *LPUARTx, uint32_t StopBits)
 Set the length of the stop bits.
__STATIC_INLINE uint32_t LL_LPUART_GetStopBitsLength (USART_TypeDef *LPUARTx)
 Retrieve the length of the stop bits.
__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.
__STATIC_INLINE uint32_t LL_LPUART_GetRXPinLevel (USART_TypeDef *LPUARTx)
 Retrieve RX pin active level logic configuration.
__STATIC_INLINE void LL_LPUART_SetTXPinLevel (USART_TypeDef *LPUARTx, uint32_t PinInvMethod)
 Configure TX pin active level logic.
__STATIC_INLINE uint32_t LL_LPUART_GetTXPinLevel (USART_TypeDef *LPUARTx)
 Retrieve TX pin active level logic configuration.
__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.
__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)
__STATIC_INLINE void LL_LPUART_EnableRTSHWFlowCtrl (USART_TypeDef *LPUARTx)
 Enable RTS HW Flow Control.
__STATIC_INLINE void LL_LPUART_DisableRTSHWFlowCtrl (USART_TypeDef *LPUARTx)
 Disable RTS HW Flow Control.
__STATIC_INLINE void LL_LPUART_EnableCTSHWFlowCtrl (USART_TypeDef *LPUARTx)
 Enable CTS HW Flow Control.
__STATIC_INLINE void LL_LPUART_DisableCTSHWFlowCtrl (USART_TypeDef *LPUARTx)
 Disable CTS HW Flow Control.
__STATIC_INLINE void LL_LPUART_SetHWFlowCtrl (USART_TypeDef *LPUARTx, uint32_t HardwareFlowControl)
 Configure HW Flow Control mode (both CTS and RTS)
__STATIC_INLINE uint32_t LL_LPUART_GetHWFlowCtrl (USART_TypeDef *LPUARTx)
 Return HW Flow Control configuration (both CTS and RTS)
__STATIC_INLINE void LL_LPUART_EnableOverrunDetect (USART_TypeDef *LPUARTx)
 Enable Overrun detection.
__STATIC_INLINE void LL_LPUART_DisableOverrunDetect (USART_TypeDef *LPUARTx)
 Disable Overrun detection.
__STATIC_INLINE uint32_t LL_LPUART_IsEnabledOverrunDetect (USART_TypeDef *LPUARTx)
 Indicate if Overrun detection is enabled.
__STATIC_INLINE void LL_LPUART_SetWKUPType (USART_TypeDef *LPUARTx, uint32_t Type)
 Select event type for Wake UP Interrupt Flag (WUS[1:0] bits)
__STATIC_INLINE uint32_t LL_LPUART_GetWKUPType (USART_TypeDef *LPUARTx)
 Return event type for Wake UP Interrupt Flag (WUS[1:0] bits)
__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 :
Reference Manual to LL API cross reference:
CR1 PS LL_LPUART_ConfigCharacter
CR1 PCE LL_LPUART_ConfigCharacter
CR1 M LL_LPUART_ConfigCharacter
CR2 STOP LL_LPUART_ConfigCharacter
Parameters:
LPUARTxLPUART Instance
DataWidthThis parameter can be one of the following values:
ParityThis parameter can be one of the following values:
StopBitsThis parameter can be one of the following values:
Return values:
None

Definition at line 1065 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)
Reference Manual to LL API cross reference:
CR2 ADD LL_LPUART_ConfigNodeAddress
CR2 ADDM7 LL_LPUART_ConfigNodeAddress
Parameters:
LPUARTxLPUART Instance
AddressLenThis parameter can be one of the following values:
NodeAddress4 or 7 bit Address of the LPUART node.
Return values:
None

Definition at line 1237 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.
Reference Manual to LL API cross reference:
CR1 UE LL_LPUART_Disable
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 543 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableClockInStopMode ( USART_TypeDef *  LPUARTx)

LPUART clock disabled in STOP Mode.

Note:
When this function is called, LPUART Clock is disabled while in STOP mode
Reference Manual to LL API cross reference:
CR3 UCESM LL_LPUART_DisableClockInStopMode
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 747 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableCTSHWFlowCtrl ( USART_TypeDef *  LPUARTx)

Disable CTS HW Flow Control.

Reference Manual to LL API cross reference:
CR3 CTSE LL_LPUART_DisableCTSHWFlowCtrl
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 1310 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableDirectionRx ( USART_TypeDef *  LPUARTx)

Receiver Disable.

Reference Manual to LL API cross reference:
CR1 RE LL_LPUART_DisableDirectionRx
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 781 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableDirectionTx ( USART_TypeDef *  LPUARTx)

Transmitter Disable.

Reference Manual to LL API cross reference:
CR1 TE LL_LPUART_DisableDirectionTx
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 803 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
Reference Manual to LL API cross reference:
CR1 UESM LL_LPUART_DisableInStopMode
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 710 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.

Reference Manual to LL API cross reference:
CR1 MME LL_LPUART_DisableMuteMode
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 949 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableOverrunDetect ( USART_TypeDef *  LPUARTx)

Disable Overrun detection.

Reference Manual to LL API cross reference:
CR3 OVRDIS LL_LPUART_DisableOverrunDetect
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 1365 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_DisableRTSHWFlowCtrl ( USART_TypeDef *  LPUARTx)

Disable RTS HW Flow Control.

Reference Manual to LL API cross reference:
CR3 RTSE LL_LPUART_DisableRTSHWFlowCtrl
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 1288 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_Enable ( USART_TypeDef *  LPUARTx)

LPUART Enable.

Reference Manual to LL API cross reference:
CR1 UE LL_LPUART_Enable
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 524 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableClockInStopMode ( USART_TypeDef *  LPUARTx)

LPUART Clock enabled in STOP Mode.

Note:
When this function is called, LPUART Clock is enabled while in STOP mode
Reference Manual to LL API cross reference:
CR3 UCESM LL_LPUART_EnableClockInStopMode
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 735 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableCTSHWFlowCtrl ( USART_TypeDef *  LPUARTx)

Enable CTS HW Flow Control.

Reference Manual to LL API cross reference:
CR3 CTSE LL_LPUART_EnableCTSHWFlowCtrl
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 1299 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)

Reference Manual to LL API cross reference:
CR1 RE LL_LPUART_EnableDirectionRx
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 770 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableDirectionTx ( USART_TypeDef *  LPUARTx)

Transmitter Enable.

Reference Manual to LL API cross reference:
CR1 TE LL_LPUART_EnableDirectionTx
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 792 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.
Reference Manual to LL API cross reference:
CR1 UESM LL_LPUART_EnableInStopMode
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 698 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableMuteMode ( USART_TypeDef *  LPUARTx)

Allow switch between Mute Mode and Active mode.

Reference Manual to LL API cross reference:
CR1 MME LL_LPUART_EnableMuteMode
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 938 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableOverrunDetect ( USART_TypeDef *  LPUARTx)

Enable Overrun detection.

Reference Manual to LL API cross reference:
CR3 OVRDIS LL_LPUART_EnableOverrunDetect
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 1354 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_EnableRTSHWFlowCtrl ( USART_TypeDef *  LPUARTx)

Enable RTS HW Flow Control.

Reference Manual to LL API cross reference:
CR3 RTSE LL_LPUART_EnableRTSHWFlowCtrl
Parameters:
LPUARTxLPUART Instance
Return values:
None

Definition at line 1277 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.
Reference Manual to LL API cross reference:
BRR BRR LL_LPUART_GetBaudRate
Parameters:
LPUARTxLPUART Instance
PeriphClkPeripheral Clock
Return values:
BaudRate

Definition at line 1481 of file stm32l4xx_ll_lpuart.h.

References LPUART_BRR_MASK, LPUART_BRR_MIN_VALUE, and LPUART_LPUARTDIV_FREQ_MUL.

__STATIC_INLINE uint32_t LL_LPUART_GetBinaryDataLogic ( USART_TypeDef *  LPUARTx)

Retrieve Binary data configuration.

Reference Manual to LL API cross reference:
CR2 DATAINV LL_LPUART_GetBinaryDataLogic
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1178 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)

Reference Manual to LL API cross reference:
CR1 M LL_LPUART_GetDataWidth
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 927 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)

Reference Manual to LL API cross reference:
CR3 RTSE LL_LPUART_GetHWFlowCtrl
CR3 CTSE LL_LPUART_GetHWFlowCtrl
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1343 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)
Reference Manual to LL API cross reference:
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 1253 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)

Reference Manual to LL API cross reference:
CR2 ADDM7 LL_LPUART_GetNodeAddressLen
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1266 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)

Reference Manual to LL API cross reference:
CR1 PS LL_LPUART_GetParity
CR1 PCE LL_LPUART_GetParity
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 871 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetRXPinLevel ( USART_TypeDef *  LPUARTx)

Retrieve RX pin active level logic configuration.

Reference Manual to LL API cross reference:
CR2 RXINV LL_LPUART_GetRXPinLevel
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1121 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetStopBitsLength ( USART_TypeDef *  LPUARTx)

Retrieve the length of the stop bits.

Reference Manual to LL API cross reference:
CR2 STOP LL_LPUART_GetStopBitsLength
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1036 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.
Reference Manual to LL API cross reference:
CR2 MSBFIRST LL_LPUART_GetTransferBitOrder
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1209 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetTransferDirection ( USART_TypeDef *  LPUARTx)

Return enabled/disabled states of Transmitter and Receiver.

Reference Manual to LL API cross reference:
CR1 RE LL_LPUART_GetTransferDirection
CR1 TE LL_LPUART_GetTransferDirection
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 837 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetTXPinLevel ( USART_TypeDef *  LPUARTx)

Retrieve TX pin active level logic configuration.

Reference Manual to LL API cross reference:
CR2 TXINV LL_LPUART_GetTXPinLevel
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1148 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetTXRXSwap ( USART_TypeDef *  LPUARTx)

Retrieve TX/RX pins swapping configuration.

Reference Manual to LL API cross reference:
CR2 SWAP LL_LPUART_GetTXRXSwap
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1094 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_GetWakeUpMethod ( USART_TypeDef *  LPUARTx)

Return Receiver Wake Up method from Mute mode.

Reference Manual to LL API cross reference:
CR1 WAKE LL_LPUART_GetWakeUpMethod
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 898 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)

Reference Manual to LL API cross reference:
CR3 WUS LL_LPUART_GetWKUPType
Parameters:
LPUARTxLPUART Instance
Return values:
Returnedvalue can be one of the following values:

Definition at line 1405 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_IsClockEnabledInStopMode ( USART_TypeDef *  LPUARTx)

Indicate if LPUART clock is enabled in STOP Mode.

Reference Manual to LL API cross reference:
CR3 UCESM LL_LPUART_IsClockEnabledInStopMode
Parameters:
LPUARTxLPUART Instance
Return values:
Stateof bit (1 or 0).

Definition at line 758 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_IsEnabled ( USART_TypeDef *  LPUARTx)

Indicate if LPUART is enabled.

Reference Manual to LL API cross reference:
CR1 UE LL_LPUART_IsEnabled
Parameters:
LPUARTxLPUART Instance
Return values:
Stateof bit (1 or 0).

Definition at line 554 of file stm32l4xx_ll_lpuart.h.

Referenced by LL_LPUART_Init().

__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)

Reference Manual to LL API cross reference:
CR1 UESM LL_LPUART_IsEnabledInStopMode
Parameters:
LPUARTxLPUART Instance
Return values:
Stateof bit (1 or 0).

Definition at line 722 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.

Reference Manual to LL API cross reference:
CR1 MME LL_LPUART_IsEnabledMuteMode
Parameters:
LPUARTxLPUART Instance
Return values:
Stateof bit (1 or 0).

Definition at line 960 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE uint32_t LL_LPUART_IsEnabledOverrunDetect ( USART_TypeDef *  LPUARTx)

Indicate if Overrun detection is enabled.

Reference Manual to LL API cross reference:
CR3 OVRDIS LL_LPUART_IsEnabledOverrunDetect
Parameters:
LPUARTxLPUART Instance
Return values:
Stateof bit (1 or 0).

Definition at line 1376 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].
Reference Manual to LL API cross reference:
BRR BRR LL_LPUART_SetBaudRate
Parameters:
LPUARTxLPUART Instance
PeriphClkPeripheral Clock
BaudRateBaud Rate
Return values:
None

Definition at line 1444 of file stm32l4xx_ll_lpuart.h.

References __LL_LPUART_DIV.

Referenced by LL_LPUART_Init().

__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)
Reference Manual to LL API cross reference:
CR2 DATAINV LL_LPUART_SetBinaryDataLogic
Parameters:
LPUARTxLPUART Instance
DataLogicThis parameter can be one of the following values:
Return values:
None

Definition at line 1165 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)

Reference Manual to LL API cross reference:
CR1 M LL_LPUART_SetDataWidth
Parameters:
LPUARTxLPUART Instance
DataWidthThis parameter can be one of the following values:
Return values:
None

Definition at line 913 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)

Reference Manual to LL API cross reference:
CR3 RTSE LL_LPUART_SetHWFlowCtrl
CR3 CTSE LL_LPUART_SetHWFlowCtrl
Parameters:
LPUARTxLPUART Instance
HardwareFlowControlThis parameter can be one of the following values:
Return values:
None

Definition at line 1327 of file stm32l4xx_ll_lpuart.h.

Referenced by LL_LPUART_Init().

__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.
Reference Manual to LL API cross reference:
CR1 PS LL_LPUART_SetParity
CR1 PCE LL_LPUART_SetParity
Parameters:
LPUARTxLPUART Instance
ParityThis parameter can be one of the following values:
Return values:
None

Definition at line 856 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetRXPinLevel ( USART_TypeDef *  LPUARTx,
uint32_t  PinInvMethod 
)

Configure RX pin active level logic.

Reference Manual to LL API cross reference:
CR2 RXINV LL_LPUART_SetRXPinLevel
Parameters:
LPUARTxLPUART Instance
PinInvMethodThis parameter can be one of the following values:
Return values:
None

Definition at line 1108 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.

Reference Manual to LL API cross reference:
CR2 STOP LL_LPUART_SetStopBitsLength
Parameters:
LPUARTxLPUART Instance
StopBitsThis parameter can be one of the following values:
Return values:
None

Definition at line 1023 of file stm32l4xx_ll_lpuart.h.

Referenced by LL_LPUART_Init().

__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.
Reference Manual to LL API cross reference:
CR2 MSBFIRST LL_LPUART_SetTransferBitOrder
Parameters:
LPUARTxLPUART Instance
BitOrderThis parameter can be one of the following values:
Return values:
None

Definition at line 1194 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.

Reference Manual to LL API cross reference:
CR1 RE LL_LPUART_SetTransferDirection
CR1 TE LL_LPUART_SetTransferDirection
Parameters:
LPUARTxLPUART Instance
TransferDirectionThis parameter can be one of the following values:
Return values:
None

Definition at line 821 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetTXPinLevel ( USART_TypeDef *  LPUARTx,
uint32_t  PinInvMethod 
)

Configure TX pin active level logic.

Reference Manual to LL API cross reference:
CR2 TXINV LL_LPUART_SetTXPinLevel
Parameters:
LPUARTxLPUART Instance
PinInvMethodThis parameter can be one of the following values:
Return values:
None

Definition at line 1135 of file stm32l4xx_ll_lpuart.h.

__STATIC_INLINE void LL_LPUART_SetTXRXSwap ( USART_TypeDef *  LPUARTx,
uint32_t  SwapConfig 
)

Configure TX/RX pins swapping setting.

Reference Manual to LL API cross reference:
CR2 SWAP LL_LPUART_SetTXRXSwap
Parameters:
LPUARTxLPUART Instance
SwapConfigThis parameter can be one of the following values:
Return values:
None

Definition at line 1081 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.

Reference Manual to LL API cross reference:
CR1 WAKE LL_LPUART_SetWakeUpMethod
Parameters:
LPUARTxLPUART Instance
MethodThis parameter can be one of the following values:
Return values:
None

Definition at line 885 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)

Reference Manual to LL API cross reference:
CR3 WUS LL_LPUART_SetWKUPType
Parameters:
LPUARTxLPUART Instance
TypeThis parameter can be one of the following values:
Return values:
None

Definition at line 1391 of file stm32l4xx_ll_lpuart.h.