STM32F4xx_HAL_Driver  1.8.3
+ Collaboration diagram for Configuration functions:

Functions

__STATIC_INLINE void LL_USART_Enable (USART_TypeDef *USARTx)
 USART Enable @rmtoll CR1 UE LL_USART_Enable. More...
 
__STATIC_INLINE void LL_USART_Disable (USART_TypeDef *USARTx)
 USART Disable (all USART prescalers and outputs are disabled) More...
 
__STATIC_INLINE uint32_t LL_USART_IsEnabled (const USART_TypeDef *USARTx)
 Indicate if USART is enabled @rmtoll CR1 UE LL_USART_IsEnabled. More...
 
__STATIC_INLINE void LL_USART_EnableDirectionRx (USART_TypeDef *USARTx)
 Receiver Enable (Receiver is enabled and begins searching for a start bit) @rmtoll CR1 RE LL_USART_EnableDirectionRx. More...
 
__STATIC_INLINE void LL_USART_DisableDirectionRx (USART_TypeDef *USARTx)
 Receiver Disable @rmtoll CR1 RE LL_USART_DisableDirectionRx. More...
 
__STATIC_INLINE void LL_USART_EnableDirectionTx (USART_TypeDef *USARTx)
 Transmitter Enable @rmtoll CR1 TE LL_USART_EnableDirectionTx. More...
 
__STATIC_INLINE void LL_USART_DisableDirectionTx (USART_TypeDef *USARTx)
 Transmitter Disable @rmtoll CR1 TE LL_USART_DisableDirectionTx. More...
 
__STATIC_INLINE void LL_USART_SetTransferDirection (USART_TypeDef *USARTx, uint32_t TransferDirection)
 Configure simultaneously enabled/disabled states of Transmitter and Receiver @rmtoll CR1 RE LL_USART_SetTransferDirection
CR1 TE LL_USART_SetTransferDirection. More...
 
__STATIC_INLINE uint32_t LL_USART_GetTransferDirection (const USART_TypeDef *USARTx)
 Return enabled/disabled states of Transmitter and Receiver @rmtoll CR1 RE LL_USART_GetTransferDirection
CR1 TE LL_USART_GetTransferDirection. More...
 
__STATIC_INLINE void LL_USART_SetParity (USART_TypeDef *USARTx, uint32_t Parity)
 Configure Parity (enabled/disabled and parity mode if enabled). More...
 
__STATIC_INLINE uint32_t LL_USART_GetParity (const USART_TypeDef *USARTx)
 Return Parity configuration (enabled/disabled and parity mode if enabled) @rmtoll CR1 PS LL_USART_GetParity
CR1 PCE LL_USART_GetParity. More...
 
__STATIC_INLINE void LL_USART_SetWakeUpMethod (USART_TypeDef *USARTx, uint32_t Method)
 Set Receiver Wake Up method from Mute mode. @rmtoll CR1 WAKE LL_USART_SetWakeUpMethod. More...
 
__STATIC_INLINE uint32_t LL_USART_GetWakeUpMethod (const USART_TypeDef *USARTx)
 Return Receiver Wake Up method from Mute mode @rmtoll CR1 WAKE LL_USART_GetWakeUpMethod. More...
 
__STATIC_INLINE void LL_USART_SetDataWidth (USART_TypeDef *USARTx, uint32_t DataWidth)
 Set Word length (i.e. nb of data bits, excluding start and stop bits) @rmtoll CR1 M LL_USART_SetDataWidth. More...
 
__STATIC_INLINE uint32_t LL_USART_GetDataWidth (const USART_TypeDef *USARTx)
 Return Word length (i.e. nb of data bits, excluding start and stop bits) @rmtoll CR1 M LL_USART_GetDataWidth. More...
 
__STATIC_INLINE void LL_USART_SetOverSampling (USART_TypeDef *USARTx, uint32_t OverSampling)
 Set Oversampling to 8-bit or 16-bit mode @rmtoll CR1 OVER8 LL_USART_SetOverSampling. More...
 
__STATIC_INLINE uint32_t LL_USART_GetOverSampling (const USART_TypeDef *USARTx)
 Return Oversampling mode @rmtoll CR1 OVER8 LL_USART_GetOverSampling. More...
 
__STATIC_INLINE void LL_USART_SetLastClkPulseOutput (USART_TypeDef *USARTx, uint32_t LastBitClockPulse)
 Configure if Clock pulse of the last data bit is output to the SCLK pin or not. More...
 
__STATIC_INLINE uint32_t LL_USART_GetLastClkPulseOutput (const USART_TypeDef *USARTx)
 Retrieve Clock pulse of the last data bit output configuration (Last bit Clock pulse output to the SCLK pin or not) More...
 
__STATIC_INLINE void LL_USART_SetClockPhase (USART_TypeDef *USARTx, uint32_t ClockPhase)
 Select the phase of the clock output on the SCLK pin in synchronous mode. More...
 
__STATIC_INLINE uint32_t LL_USART_GetClockPhase (const USART_TypeDef *USARTx)
 Return phase of the clock output on the SCLK pin in synchronous mode. More...
 
__STATIC_INLINE void LL_USART_SetClockPolarity (USART_TypeDef *USARTx, uint32_t ClockPolarity)
 Select the polarity of the clock output on the SCLK pin in synchronous mode. More...
 
__STATIC_INLINE uint32_t LL_USART_GetClockPolarity (const USART_TypeDef *USARTx)
 Return polarity of the clock output on the SCLK pin in synchronous mode. More...
 
__STATIC_INLINE void LL_USART_ConfigClock (USART_TypeDef *USARTx, uint32_t Phase, uint32_t Polarity, uint32_t LBCPOutput)
 Configure Clock signal format (Phase Polarity and choice about output of last bit clock pulse) More...
 
__STATIC_INLINE void LL_USART_EnableSCLKOutput (USART_TypeDef *USARTx)
 Enable Clock output on SCLK pin. More...
 
__STATIC_INLINE void LL_USART_DisableSCLKOutput (USART_TypeDef *USARTx)
 Disable Clock output on SCLK pin. More...
 
__STATIC_INLINE uint32_t LL_USART_IsEnabledSCLKOutput (const USART_TypeDef *USARTx)
 Indicate if Clock output on SCLK pin is enabled. More...
 
__STATIC_INLINE void LL_USART_SetStopBitsLength (USART_TypeDef *USARTx, uint32_t StopBits)
 Set the length of the stop bits @rmtoll CR2 STOP LL_USART_SetStopBitsLength. More...
 
__STATIC_INLINE uint32_t LL_USART_GetStopBitsLength (const USART_TypeDef *USARTx)
 Retrieve the length of the stop bits @rmtoll CR2 STOP LL_USART_GetStopBitsLength. More...
 
__STATIC_INLINE void LL_USART_ConfigCharacter (USART_TypeDef *USARTx, uint32_t DataWidth, uint32_t Parity, uint32_t StopBits)
 Configure Character frame format (Datawidth, Parity control, Stop Bits) More...
 
__STATIC_INLINE void LL_USART_SetNodeAddress (USART_TypeDef *USARTx, uint32_t NodeAddress)
 Set Address of the USART node. More...
 
__STATIC_INLINE uint32_t LL_USART_GetNodeAddress (const USART_TypeDef *USARTx)
 Return 4 bit Address of the USART node as set in ADD field of CR2. More...
 
__STATIC_INLINE void LL_USART_EnableRTSHWFlowCtrl (USART_TypeDef *USARTx)
 Enable RTS HW Flow Control. More...
 
__STATIC_INLINE void LL_USART_DisableRTSHWFlowCtrl (USART_TypeDef *USARTx)
 Disable RTS HW Flow Control. More...
 
__STATIC_INLINE void LL_USART_EnableCTSHWFlowCtrl (USART_TypeDef *USARTx)
 Enable CTS HW Flow Control. More...
 
__STATIC_INLINE void LL_USART_DisableCTSHWFlowCtrl (USART_TypeDef *USARTx)
 Disable CTS HW Flow Control. More...
 
__STATIC_INLINE void LL_USART_SetHWFlowCtrl (USART_TypeDef *USARTx, uint32_t HardwareFlowControl)
 Configure HW Flow Control mode (both CTS and RTS) More...
 
__STATIC_INLINE uint32_t LL_USART_GetHWFlowCtrl (const USART_TypeDef *USARTx)
 Return HW Flow Control configuration (both CTS and RTS) More...
 
__STATIC_INLINE void LL_USART_EnableOneBitSamp (USART_TypeDef *USARTx)
 Enable One bit sampling method @rmtoll CR3 ONEBIT LL_USART_EnableOneBitSamp. More...
 
__STATIC_INLINE void LL_USART_DisableOneBitSamp (USART_TypeDef *USARTx)
 Disable One bit sampling method @rmtoll CR3 ONEBIT LL_USART_DisableOneBitSamp. More...
 
__STATIC_INLINE uint32_t LL_USART_IsEnabledOneBitSamp (const USART_TypeDef *USARTx)
 Indicate if One bit sampling method is enabled @rmtoll CR3 ONEBIT LL_USART_IsEnabledOneBitSamp. More...
 
__STATIC_INLINE void LL_USART_SetBaudRate (USART_TypeDef *USARTx, uint32_t PeriphClk, uint32_t OverSampling, uint32_t BaudRate)
 Configure USART BRR register for achieving expected Baud Rate value. More...
 
__STATIC_INLINE uint32_t LL_USART_GetBaudRate (const USART_TypeDef *USARTx, uint32_t PeriphClk, uint32_t OverSampling)
 Return current Baud Rate value, according to USARTDIV present in BRR register (full BRR content), and to used Peripheral Clock and Oversampling mode values. More...
 

Detailed Description

Function Documentation

◆ LL_USART_ConfigCharacter()

__STATIC_INLINE void LL_USART_ConfigCharacter ( USART_TypeDef *  USARTx,
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
USARTxUSART Instance
DataWidthThis parameter can be one of the following values:
  • LL_USART_DATAWIDTH_8B
  • LL_USART_DATAWIDTH_9B
ParityThis parameter can be one of the following values:
  • LL_USART_PARITY_NONE
  • LL_USART_PARITY_EVEN
  • LL_USART_PARITY_ODD
StopBitsThis parameter can be one of the following values:
  • LL_USART_STOPBITS_0_5
  • LL_USART_STOPBITS_1
  • LL_USART_STOPBITS_1_5
  • LL_USART_STOPBITS_2
Return values
None

Definition at line 850 of file stm32f4xx_ll_usart.h.

◆ LL_USART_ConfigClock()

__STATIC_INLINE void LL_USART_ConfigClock ( USART_TypeDef *  USARTx,
uint32_t  Phase,
uint32_t  Polarity,
uint32_t  LBCPOutput 
)

Configure Clock signal format (Phase Polarity and choice about output of last bit clock pulse)

Note
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance.
Call of this function is equivalent to following function call sequence :
Parameters
USARTxUSART Instance
PhaseThis parameter can be one of the following values:
  • LL_USART_PHASE_1EDGE
  • LL_USART_PHASE_2EDGE
PolarityThis parameter can be one of the following values:
  • LL_USART_POLARITY_LOW
  • LL_USART_POLARITY_HIGH
LBCPOutputThis parameter can be one of the following values:
  • LL_USART_LASTCLKPULSE_NO_OUTPUT
  • LL_USART_LASTCLKPULSE_OUTPUT
Return values
None

Definition at line 750 of file stm32f4xx_ll_usart.h.

◆ LL_USART_Disable()

__STATIC_INLINE void LL_USART_Disable ( USART_TypeDef *  USARTx)

USART Disable (all USART prescalers and outputs are disabled)

Note
When USART is disabled, USART prescalers and outputs are stopped immediately, and current operations are discarded. The configuration of the USART is kept, but all the status flags, in the USARTx_SR are set to their default values. @rmtoll CR1 UE LL_USART_Disable
Parameters
USARTxUSART Instance
Return values
None

Definition at line 424 of file stm32f4xx_ll_usart.h.

◆ LL_USART_DisableCTSHWFlowCtrl()

__STATIC_INLINE void LL_USART_DisableCTSHWFlowCtrl ( USART_TypeDef *  USARTx)

Disable CTS HW Flow Control.

Note
Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. @rmtoll CR3 CTSE LL_USART_DisableCTSHWFlowCtrl
Parameters
USARTxUSART Instance
Return values
None

Definition at line 930 of file stm32f4xx_ll_usart.h.

◆ LL_USART_DisableDirectionRx()

__STATIC_INLINE void LL_USART_DisableDirectionRx ( USART_TypeDef *  USARTx)

Receiver Disable @rmtoll CR1 RE LL_USART_DisableDirectionRx.

Parameters
USARTxUSART Instance
Return values
None

Definition at line 457 of file stm32f4xx_ll_usart.h.

◆ LL_USART_DisableDirectionTx()

__STATIC_INLINE void LL_USART_DisableDirectionTx ( USART_TypeDef *  USARTx)

Transmitter Disable @rmtoll CR1 TE LL_USART_DisableDirectionTx.

Parameters
USARTxUSART Instance
Return values
None

Definition at line 479 of file stm32f4xx_ll_usart.h.

◆ LL_USART_DisableOneBitSamp()

__STATIC_INLINE void LL_USART_DisableOneBitSamp ( USART_TypeDef *  USARTx)

Disable One bit sampling method @rmtoll CR3 ONEBIT LL_USART_DisableOneBitSamp.

Parameters
USARTxUSART Instance
Return values
None

Definition at line 989 of file stm32f4xx_ll_usart.h.

◆ LL_USART_DisableRTSHWFlowCtrl()

__STATIC_INLINE void LL_USART_DisableRTSHWFlowCtrl ( USART_TypeDef *  USARTx)

Disable RTS HW Flow Control.

Note
Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. @rmtoll CR3 RTSE LL_USART_DisableRTSHWFlowCtrl
Parameters
USARTxUSART Instance
Return values
None

Definition at line 904 of file stm32f4xx_ll_usart.h.

◆ LL_USART_DisableSCLKOutput()

__STATIC_INLINE void LL_USART_DisableSCLKOutput ( USART_TypeDef *  USARTx)

Disable Clock output on SCLK pin.

Note
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. @rmtoll CR2 CLKEN LL_USART_DisableSCLKOutput
Parameters
USARTxUSART Instance
Return values
None

Definition at line 776 of file stm32f4xx_ll_usart.h.

◆ LL_USART_Enable()

__STATIC_INLINE void LL_USART_Enable ( USART_TypeDef *  USARTx)

USART Enable @rmtoll CR1 UE LL_USART_Enable.

Parameters
USARTxUSART Instance
Return values
None

Definition at line 410 of file stm32f4xx_ll_usart.h.

◆ LL_USART_EnableCTSHWFlowCtrl()

__STATIC_INLINE void LL_USART_EnableCTSHWFlowCtrl ( USART_TypeDef *  USARTx)

Enable CTS HW Flow Control.

Note
Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. @rmtoll CR3 CTSE LL_USART_EnableCTSHWFlowCtrl
Parameters
USARTxUSART Instance
Return values
None

Definition at line 917 of file stm32f4xx_ll_usart.h.

◆ LL_USART_EnableDirectionRx()

__STATIC_INLINE void LL_USART_EnableDirectionRx ( USART_TypeDef *  USARTx)

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

Parameters
USARTxUSART Instance
Return values
None

Definition at line 446 of file stm32f4xx_ll_usart.h.

◆ LL_USART_EnableDirectionTx()

__STATIC_INLINE void LL_USART_EnableDirectionTx ( USART_TypeDef *  USARTx)

Transmitter Enable @rmtoll CR1 TE LL_USART_EnableDirectionTx.

Parameters
USARTxUSART Instance
Return values
None

Definition at line 468 of file stm32f4xx_ll_usart.h.

◆ LL_USART_EnableOneBitSamp()

__STATIC_INLINE void LL_USART_EnableOneBitSamp ( USART_TypeDef *  USARTx)

Enable One bit sampling method @rmtoll CR3 ONEBIT LL_USART_EnableOneBitSamp.

Parameters
USARTxUSART Instance
Return values
None

Definition at line 978 of file stm32f4xx_ll_usart.h.

◆ LL_USART_EnableRTSHWFlowCtrl()

__STATIC_INLINE void LL_USART_EnableRTSHWFlowCtrl ( USART_TypeDef *  USARTx)

Enable RTS HW Flow Control.

Note
Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. @rmtoll CR3 RTSE LL_USART_EnableRTSHWFlowCtrl
Parameters
USARTxUSART Instance
Return values
None

Definition at line 891 of file stm32f4xx_ll_usart.h.

◆ LL_USART_EnableSCLKOutput()

__STATIC_INLINE void LL_USART_EnableSCLKOutput ( USART_TypeDef *  USARTx)

Enable Clock output on SCLK pin.

Note
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. @rmtoll CR2 CLKEN LL_USART_EnableSCLKOutput
Parameters
USARTxUSART Instance
Return values
None

Definition at line 763 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetBaudRate()

__STATIC_INLINE uint32_t LL_USART_GetBaudRate ( const USART_TypeDef *  USARTx,
uint32_t  PeriphClk,
uint32_t  OverSampling 
)

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

Note
In case of non-initialized or invalid value stored in BRR register, value 0 will be returned. @rmtoll BRR BRR LL_USART_GetBaudRate
Parameters
USARTxUSART Instance
PeriphClkPeripheral Clock
OverSamplingThis parameter can be one of the following values:
  • LL_USART_OVERSAMPLING_16
  • LL_USART_OVERSAMPLING_8
Return values
BaudRate

Definition at line 1045 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetClockPhase()

__STATIC_INLINE uint32_t LL_USART_GetClockPhase ( const USART_TypeDef *  USARTx)

Return phase of the clock output on the SCLK pin in synchronous mode.

Note
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. @rmtoll CR2 CPHA LL_USART_GetClockPhase
Parameters
USARTxUSART Instance
Return values
Returnedvalue can be one of the following values:
  • LL_USART_PHASE_1EDGE
  • LL_USART_PHASE_2EDGE

Definition at line 691 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetClockPolarity()

__STATIC_INLINE uint32_t LL_USART_GetClockPolarity ( const USART_TypeDef *  USARTx)

Return polarity of the clock output on the SCLK pin in synchronous mode.

Note
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. @rmtoll CR2 CPOL LL_USART_GetClockPolarity
Parameters
USARTxUSART Instance
Return values
Returnedvalue can be one of the following values:
  • LL_USART_POLARITY_LOW
  • LL_USART_POLARITY_HIGH

Definition at line 722 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetDataWidth()

__STATIC_INLINE uint32_t LL_USART_GetDataWidth ( const USART_TypeDef *  USARTx)

Return Word length (i.e. nb of data bits, excluding start and stop bits) @rmtoll CR1 M LL_USART_GetDataWidth.

Parameters
USARTxUSART Instance
Return values
Returnedvalue can be one of the following values:
  • LL_USART_DATAWIDTH_8B
  • LL_USART_DATAWIDTH_9B

Definition at line 601 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetHWFlowCtrl()

__STATIC_INLINE uint32_t LL_USART_GetHWFlowCtrl ( const USART_TypeDef *  USARTx)

Return HW Flow Control configuration (both CTS and RTS)

Note
Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. @rmtoll CR3 RTSE LL_USART_GetHWFlowCtrl
CR3 CTSE LL_USART_GetHWFlowCtrl
Parameters
USARTxUSART Instance
Return values
Returnedvalue can be one of the following values:
  • LL_USART_HWCONTROL_NONE
  • LL_USART_HWCONTROL_RTS
  • LL_USART_HWCONTROL_CTS
  • LL_USART_HWCONTROL_RTS_CTS

Definition at line 967 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetLastClkPulseOutput()

__STATIC_INLINE uint32_t LL_USART_GetLastClkPulseOutput ( const USART_TypeDef *  USARTx)

Retrieve Clock pulse of the last data bit output configuration (Last bit Clock pulse output to the SCLK pin or not)

Note
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. @rmtoll CR2 LBCL LL_USART_GetLastClkPulseOutput
Parameters
USARTxUSART Instance
Return values
Returnedvalue can be one of the following values:
  • LL_USART_LASTCLKPULSE_NO_OUTPUT
  • LL_USART_LASTCLKPULSE_OUTPUT

Definition at line 660 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetNodeAddress()

__STATIC_INLINE uint32_t LL_USART_GetNodeAddress ( const USART_TypeDef *  USARTx)

Return 4 bit Address of the USART node as set in ADD field of CR2.

Note
only 4bits (b3-b0) of returned value are relevant (b31-b4 are not relevant) @rmtoll CR2 ADD LL_USART_GetNodeAddress
Parameters
USARTxUSART Instance
Return values
Addressof the USART node (Value between Min_Data=0 and Max_Data=255)

Definition at line 878 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetOverSampling()

__STATIC_INLINE uint32_t LL_USART_GetOverSampling ( const USART_TypeDef *  USARTx)

Return Oversampling mode @rmtoll CR1 OVER8 LL_USART_GetOverSampling.

Parameters
USARTxUSART Instance
Return values
Returnedvalue can be one of the following values:
  • LL_USART_OVERSAMPLING_16
  • LL_USART_OVERSAMPLING_8

Definition at line 628 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetParity()

__STATIC_INLINE uint32_t LL_USART_GetParity ( const USART_TypeDef *  USARTx)

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

Parameters
USARTxUSART Instance
Return values
Returnedvalue can be one of the following values:
  • LL_USART_PARITY_NONE
  • LL_USART_PARITY_EVEN
  • LL_USART_PARITY_ODD

Definition at line 547 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetStopBitsLength()

__STATIC_INLINE uint32_t LL_USART_GetStopBitsLength ( const USART_TypeDef *  USARTx)

Retrieve the length of the stop bits @rmtoll CR2 STOP LL_USART_GetStopBitsLength.

Parameters
USARTxUSART Instance
Return values
Returnedvalue can be one of the following values:
  • LL_USART_STOPBITS_0_5
  • LL_USART_STOPBITS_1
  • LL_USART_STOPBITS_1_5
  • LL_USART_STOPBITS_2

Definition at line 820 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetTransferDirection()

__STATIC_INLINE uint32_t LL_USART_GetTransferDirection ( const USART_TypeDef *  USARTx)

Return enabled/disabled states of Transmitter and Receiver @rmtoll CR1 RE LL_USART_GetTransferDirection
CR1 TE LL_USART_GetTransferDirection.

Parameters
USARTxUSART Instance
Return values
Returnedvalue can be one of the following values:
  • LL_USART_DIRECTION_NONE
  • LL_USART_DIRECTION_RX
  • LL_USART_DIRECTION_TX
  • LL_USART_DIRECTION_TX_RX

Definition at line 513 of file stm32f4xx_ll_usart.h.

◆ LL_USART_GetWakeUpMethod()

__STATIC_INLINE uint32_t LL_USART_GetWakeUpMethod ( const USART_TypeDef *  USARTx)

Return Receiver Wake Up method from Mute mode @rmtoll CR1 WAKE LL_USART_GetWakeUpMethod.

Parameters
USARTxUSART Instance
Return values
Returnedvalue can be one of the following values:
  • LL_USART_WAKEUP_IDLELINE
  • LL_USART_WAKEUP_ADDRESSMARK

Definition at line 574 of file stm32f4xx_ll_usart.h.

◆ LL_USART_IsEnabled()

__STATIC_INLINE uint32_t LL_USART_IsEnabled ( const USART_TypeDef *  USARTx)

Indicate if USART is enabled @rmtoll CR1 UE LL_USART_IsEnabled.

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

Definition at line 435 of file stm32f4xx_ll_usart.h.

◆ LL_USART_IsEnabledOneBitSamp()

__STATIC_INLINE uint32_t LL_USART_IsEnabledOneBitSamp ( const USART_TypeDef *  USARTx)

Indicate if One bit sampling method is enabled @rmtoll CR3 ONEBIT LL_USART_IsEnabledOneBitSamp.

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

Definition at line 1000 of file stm32f4xx_ll_usart.h.

◆ LL_USART_IsEnabledSCLKOutput()

__STATIC_INLINE uint32_t LL_USART_IsEnabledSCLKOutput ( const USART_TypeDef *  USARTx)

Indicate if Clock output on SCLK pin is enabled.

Note
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. @rmtoll CR2 CLKEN LL_USART_IsEnabledSCLKOutput
Parameters
USARTxUSART Instance
Return values
Stateof bit (1 or 0).

Definition at line 789 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetBaudRate()

__STATIC_INLINE void LL_USART_SetBaudRate ( USART_TypeDef *  USARTx,
uint32_t  PeriphClk,
uint32_t  OverSampling,
uint32_t  BaudRate 
)

Configure USART BRR register for achieving expected Baud Rate value.

Note
Compute and set USARTDIV value in BRR Register (full BRR content) according to used Peripheral Clock, Oversampling mode, and expected Baud Rate values
Peripheral clock and Baud rate values provided as function parameters should be valid (Baud rate value != 0) @rmtoll BRR BRR LL_USART_SetBaudRate
Parameters
USARTxUSART Instance
PeriphClkPeripheral Clock
OverSamplingThis parameter can be one of the following values:
  • LL_USART_OVERSAMPLING_16
  • LL_USART_OVERSAMPLING_8
BaudRateBaud Rate
Return values
None

Definition at line 1020 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetClockPhase()

__STATIC_INLINE void LL_USART_SetClockPhase ( USART_TypeDef *  USARTx,
uint32_t  ClockPhase 
)

Select the phase of the clock output on the SCLK pin in synchronous mode.

Note
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. @rmtoll CR2 CPHA LL_USART_SetClockPhase
Parameters
USARTxUSART Instance
ClockPhaseThis parameter can be one of the following values:
  • LL_USART_PHASE_1EDGE
  • LL_USART_PHASE_2EDGE
Return values
None

Definition at line 676 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetClockPolarity()

__STATIC_INLINE void LL_USART_SetClockPolarity ( USART_TypeDef *  USARTx,
uint32_t  ClockPolarity 
)

Select the polarity of the clock output on the SCLK pin in synchronous mode.

Note
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. @rmtoll CR2 CPOL LL_USART_SetClockPolarity
Parameters
USARTxUSART Instance
ClockPolarityThis parameter can be one of the following values:
  • LL_USART_POLARITY_LOW
  • LL_USART_POLARITY_HIGH
Return values
None

Definition at line 707 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetDataWidth()

__STATIC_INLINE void LL_USART_SetDataWidth ( USART_TypeDef *  USARTx,
uint32_t  DataWidth 
)

Set Word length (i.e. nb of data bits, excluding start and stop bits) @rmtoll CR1 M LL_USART_SetDataWidth.

Parameters
USARTxUSART Instance
DataWidthThis parameter can be one of the following values:
  • LL_USART_DATAWIDTH_8B
  • LL_USART_DATAWIDTH_9B
Return values
None

Definition at line 588 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetHWFlowCtrl()

__STATIC_INLINE void LL_USART_SetHWFlowCtrl ( USART_TypeDef *  USARTx,
uint32_t  HardwareFlowControl 
)

Configure HW Flow Control mode (both CTS and RTS)

Note
Macro IS_UART_HWFLOW_INSTANCE(USARTx) can be used to check whether or not Hardware Flow control feature is supported by the USARTx instance. @rmtoll CR3 RTSE LL_USART_SetHWFlowCtrl
CR3 CTSE LL_USART_SetHWFlowCtrl
Parameters
USARTxUSART Instance
HardwareFlowControlThis parameter can be one of the following values:
  • LL_USART_HWCONTROL_NONE
  • LL_USART_HWCONTROL_RTS
  • LL_USART_HWCONTROL_CTS
  • LL_USART_HWCONTROL_RTS_CTS
Return values
None

Definition at line 949 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetLastClkPulseOutput()

__STATIC_INLINE void LL_USART_SetLastClkPulseOutput ( USART_TypeDef *  USARTx,
uint32_t  LastBitClockPulse 
)

Configure if Clock pulse of the last data bit is output to the SCLK pin or not.

Note
Macro IS_USART_INSTANCE(USARTx) can be used to check whether or not Synchronous mode is supported by the USARTx instance. @rmtoll CR2 LBCL LL_USART_SetLastClkPulseOutput
Parameters
USARTxUSART Instance
LastBitClockPulseThis parameter can be one of the following values:
  • LL_USART_LASTCLKPULSE_NO_OUTPUT
  • LL_USART_LASTCLKPULSE_OUTPUT
Return values
None

Definition at line 644 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetNodeAddress()

__STATIC_INLINE void LL_USART_SetNodeAddress ( USART_TypeDef *  USARTx,
uint32_t  NodeAddress 
)

Set Address of the USART node.

Note
This is used in multiprocessor communication during Mute mode or Stop mode, for wake up with address mark detection. @rmtoll CR2 ADD LL_USART_SetNodeAddress
Parameters
USARTxUSART Instance
NodeAddress4 bit Address of the USART node.
Return values
None

Definition at line 866 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetOverSampling()

__STATIC_INLINE void LL_USART_SetOverSampling ( USART_TypeDef *  USARTx,
uint32_t  OverSampling 
)

Set Oversampling to 8-bit or 16-bit mode @rmtoll CR1 OVER8 LL_USART_SetOverSampling.

Parameters
USARTxUSART Instance
OverSamplingThis parameter can be one of the following values:
  • LL_USART_OVERSAMPLING_16
  • LL_USART_OVERSAMPLING_8
Return values
None

Definition at line 615 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetParity()

__STATIC_INLINE void LL_USART_SetParity ( USART_TypeDef *  USARTx,
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 (9th or 8th bit depending on data width) and parity is checked on the received data. @rmtoll CR1 PS LL_USART_SetParity
CR1 PCE LL_USART_SetParity
Parameters
USARTxUSART Instance
ParityThis parameter can be one of the following values:
  • LL_USART_PARITY_NONE
  • LL_USART_PARITY_EVEN
  • LL_USART_PARITY_ODD
Return values
None

Definition at line 532 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetStopBitsLength()

__STATIC_INLINE void LL_USART_SetStopBitsLength ( USART_TypeDef *  USARTx,
uint32_t  StopBits 
)

Set the length of the stop bits @rmtoll CR2 STOP LL_USART_SetStopBitsLength.

Parameters
USARTxUSART Instance
StopBitsThis parameter can be one of the following values:
  • LL_USART_STOPBITS_0_5
  • LL_USART_STOPBITS_1
  • LL_USART_STOPBITS_1_5
  • LL_USART_STOPBITS_2
Return values
None

Definition at line 805 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetTransferDirection()

__STATIC_INLINE void LL_USART_SetTransferDirection ( USART_TypeDef *  USARTx,
uint32_t  TransferDirection 
)

Configure simultaneously enabled/disabled states of Transmitter and Receiver @rmtoll CR1 RE LL_USART_SetTransferDirection
CR1 TE LL_USART_SetTransferDirection.

Parameters
USARTxUSART Instance
TransferDirectionThis parameter can be one of the following values:
  • LL_USART_DIRECTION_NONE
  • LL_USART_DIRECTION_RX
  • LL_USART_DIRECTION_TX
  • LL_USART_DIRECTION_TX_RX
Return values
None

Definition at line 497 of file stm32f4xx_ll_usart.h.

◆ LL_USART_SetWakeUpMethod()

__STATIC_INLINE void LL_USART_SetWakeUpMethod ( USART_TypeDef *  USARTx,
uint32_t  Method 
)

Set Receiver Wake Up method from Mute mode. @rmtoll CR1 WAKE LL_USART_SetWakeUpMethod.

Parameters
USARTxUSART Instance
MethodThis parameter can be one of the following values:
  • LL_USART_WAKEUP_IDLELINE
  • LL_USART_WAKEUP_ADDRESSMARK
Return values
None

Definition at line 561 of file stm32f4xx_ll_usart.h.