STM32L486xx HAL User Manual
Data Fields
UART_InitTypeDef Struct Reference

UART Init Structure definition. More...

#include <stm32l4xx_hal_uart.h>

Data Fields

uint32_t BaudRate
uint32_t WordLength
uint32_t StopBits
uint32_t Parity
uint32_t Mode
uint32_t HwFlowCtl
uint32_t OverSampling
uint32_t OneBitSampling

Detailed Description

UART Init Structure definition.

Definition at line 63 of file stm32l4xx_hal_uart.h.


Field Documentation

This member configures the UART communication baud rate. The baud rate register is computed using the following formula: UART: =====

  • If oversampling is 16 or in LIN mode, Baud Rate Register = ((uart_ker_ckpres) / ((huart->Init.BaudRate)))
  • If oversampling is 8, Baud Rate Register[15:4] = ((2 * uart_ker_ckpres) / ((huart->Init.BaudRate)))[15:4] Baud Rate Register[3] = 0 Baud Rate Register[2:0] = (((2 * uart_ker_ckpres) / ((huart->Init.BaudRate)))[3:0]) >> 1 LPUART: ======= Baud Rate Register = ((256 * lpuart_ker_ckpres) / ((huart->Init.BaudRate)))

where (uart/lpuart)_ker_ck_pres is the UART input clock divided by a prescaler

Definition at line 65 of file stm32l4xx_hal_uart.h.

Referenced by UART_SetConfig().

Specifies whether the hardware flow control mode is enabled or disabled. This parameter can be a value of UART Hardware Flow Control.

Definition at line 97 of file stm32l4xx_hal_uart.h.

Referenced by HAL_UART_Init(), and UART_SetConfig().

Specifies whether the Receive or Transmit mode is enabled or disabled. This parameter can be a value of UART Transfer Mode.

Definition at line 94 of file stm32l4xx_hal_uart.h.

Referenced by UART_SetConfig().

Specifies whether a single sample or three samples' majority vote is selected. Selecting the single sample method increases the receiver tolerance to clock deviations. This parameter can be a value of UART One Bit Sampling Method.

Definition at line 104 of file stm32l4xx_hal_uart.h.

Referenced by UART_SetConfig().

Specifies whether the Over sampling 8 is enabled or disabled, to achieve higher speed (up to f_PCLK/8). This parameter can be a value of UART Over Sampling.

Definition at line 101 of file stm32l4xx_hal_uart.h.

Referenced by HAL_LIN_Init(), and UART_SetConfig().

Specifies the parity mode. This parameter can be a value of UART Parity

Note:
When parity is enabled, the computed parity is inserted at the MSB position of the transmitted data (9th bit when the word length is set to 9 data bits; 8th bit when the word length is set to 8 data bits).

Definition at line 87 of file stm32l4xx_hal_uart.h.

Referenced by HAL_UART_Receive(), HAL_UART_Receive_IT(), HAL_UART_Transmit(), HAL_UART_Transmit_IT(), and UART_SetConfig().

Specifies the number of stop bits transmitted. This parameter can be a value of UART Number of Stop Bits.

Definition at line 84 of file stm32l4xx_hal_uart.h.

Referenced by UART_SetConfig().

Specifies the number of data bits transmitted or received in a frame. This parameter can be a value of UARTEx Word Length.

Definition at line 81 of file stm32l4xx_hal_uart.h.

Referenced by HAL_LIN_Init(), HAL_UART_Receive(), HAL_UART_Receive_IT(), HAL_UART_Transmit(), HAL_UART_Transmit_IT(), and UART_SetConfig().


The documentation for this struct was generated from the following file: