EasyManuals Logo

ST STM32L0x3 User Manual

ST STM32L0x3
1043 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 #780 background imageLoading...
Page #780 background image
Universal synchronous/asynchronous receiver transmitter (USART/UART) RM0367
780/1043 RM0367 Rev 7
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 or 8, USARTDIV must be greater than or equal to 16d.
How to derive USARTDIV from USART_BRR register values
Example 1
To obtain 9600 baud with f
CK
= 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 f
CK
= 32 MHz.
In case of oversampling by 16:
USARTDIV = 32 000 000/921 600
BRR = USARTDIV = 35d = 23h
In case of oversampling by 8:
USARTDIV = 2 * 32 000 000/921 600
USARTDIV = 70d = 46h
BRR[3:0] = USARTDIV[3:0] >> 1 = 6h >> 1 = 3h
BRR = 0x43

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

ST STM32L0x3 Specifications

General IconGeneral
BrandST
ModelSTM32L0x3
CategoryMicrocontrollers
LanguageEnglish

Related product manuals