EasyManua.ls Logo

ST STM32G474 User Manual

ST STM32G474
2126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1612 background imageLoading...
Page #1612 background image
Universal synchronous/asynchronous receiver transmitter (USART/UART) RM0440
1612/2126 RM0440 Rev 4
USARTDIV is an unsigned fixed point number that is coded on the USART_BRR register.
When OVER8 = 0, BRR = USARTDIV.
When OVER8 = 1
BRR[2:0] = USARTDIV[3:0] shifted 1 bit to the right.
BRR[3] must be kept cleared.
BRR[15:4] = USARTDIV[15:4]
Note: The baud counters are updated to the new value in the baud registers after a write operation
to USART_BRR. Hence the baud rate register value should not be changed during
communication.
In case of oversampling by 16 and 8, USARTDIV must be greater than or equal to 16.
How to derive USARTDIV from USART_BRR register values
Example 1
To obtain 9600 baud with usart_ker_ck_pres= 8 MHz:
In case of oversampling by 16:
USARTDIV = 8 000 000/9600
BRR = USARTDIV = 833d = 0341h
In case of oversampling by 8:
USARTDIV = 2 * 8 000 000/9600
USARTDIV = 1666,66 (1667d = 683h)
BRR[3:0] = 3h >>1 = 1h
BRR = 0x681
Example 2
To obtain 921.6 Kbaud with usart_ker_ck_pres = 48 MHz:
In case of oversampling by 16:
USARTDIV = 48 000 000/921 600
BRR = USARTDIV = 52d = 34h
In case of oversampling by 8:
USARTDIV = 2 * 48 000 000/921 600
USARTDIV = 104 (104d = 68h)
BRR[3:0] = USARTDIV[3:0] >> 1 = 8h >> 1 = 4h
BRR = 0x64
37.5.8 Tolerance of the USART receiver to clock deviation
The USART asynchronous receiver operates correctly only if the total clock system
deviation is less than the tolerance of the USART receiver.

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the ST STM32G474 and is the answer not in the manual?

ST STM32G474 Specifications

General IconGeneral
SeriesSTM32G4
Core ProcessorARM Cortex-M4
Core Size32-bit
Max CPU Frequency170 MHz
Flash Memory512 KB
SRAM128 KB
GPIO Pins51
ADC Resolution12-bit
DAC Resolution12-bit
Operating Voltage1.7V to 3.6V
Communication InterfacesI2C, SPI, USART, USB
Operating Temperature-40°C to 85°C
PackageLQFP64, LQFP48
ConnectivityUSB, CAN
PeripheralsADC, DAC
Oscillator TypeInternal, External

Related product manuals