STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
UART_InitTypeDef Struct Reference

UART Init Structure definition. More...

#include <stm32f4xx_hal_uart.h>

Collaboration diagram for UART_InitTypeDef:

Data Fields

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

Detailed Description

UART Init Structure definition.

Definition at line 46 of file stm32f4xx_hal_uart.h.

Field Documentation

◆ BaudRate

uint32_t UART_InitTypeDef::BaudRate

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

  • IntegerDivider = ((PCLKx) / (8 * (OVR8+1) * (huart->Init.BaudRate)))
  • FractionalDivider = ((IntegerDivider - ((uint32_t) IntegerDivider)) * 8 * (OVR8+1)) + 0.5 Where OVR8 is the "oversampling by 8 mode" configuration bit in the CR1 register.

Definition at line 48 of file stm32f4xx_hal_uart.h.

Referenced by UART_SetConfig().

◆ WordLength

uint32_t UART_InitTypeDef::WordLength

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

Definition at line 54 of file stm32f4xx_hal_uart.h.

Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_Init(), HAL_UART_Init(), HAL_UART_Receive(), HAL_UART_Transmit(), HAL_UARTEx_ReceiveToIdle(), UART_Receive_IT(), UART_SetConfig(), and UART_Transmit_IT().

◆ StopBits

uint32_t UART_InitTypeDef::StopBits

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

Definition at line 57 of file stm32f4xx_hal_uart.h.

Referenced by UART_SetConfig().

◆ Parity

uint32_t UART_InitTypeDef::Parity

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 60 of file stm32f4xx_hal_uart.h.

Referenced by HAL_UART_DMAResume(), HAL_UART_Receive(), HAL_UART_Transmit(), HAL_UARTEx_ReceiveToIdle(), UART_Receive_IT(), UART_SetConfig(), UART_Start_Receive_DMA(), UART_Start_Receive_IT(), and UART_Transmit_IT().

◆ Mode

uint32_t UART_InitTypeDef::Mode

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

Definition at line 67 of file stm32f4xx_hal_uart.h.

Referenced by UART_SetConfig().

◆ HwFlowCtl

uint32_t UART_InitTypeDef::HwFlowCtl

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 70 of file stm32f4xx_hal_uart.h.

Referenced by HAL_UART_Init(), and UART_SetConfig().

◆ OverSampling

uint32_t UART_InitTypeDef::OverSampling

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

Definition at line 73 of file stm32f4xx_hal_uart.h.

Referenced by HAL_HalfDuplex_Init(), HAL_LIN_Init(), HAL_MultiProcessor_Init(), HAL_UART_Init(), and UART_SetConfig().


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