Figure 307. Word Length Programming - ST STM32WL55JC Reference Manual

Advanced arm-based 32-bit mcus with sub-ghz radio solution
Table of Contents

Advertisement

RM0453
Character transmission procedure
To transmit a character, follow the sequence below:
1.
Program the M bits in USART_CR1 to define the word length.
2.
Select the desired baud rate using the USART_BRR register.
3.
Program the number of stop bits in USART_CR2.
4.
Enable the USART by writing the UE bit in USART_CR1 register to 1.
5.
Select DMA enable (DMAT) in USART_CR3 if multibuffer communication must take
place. Configure the DMA register as explained in
multiprocessor
6.
Set the TE bit in USART_CR1 to send an idle frame as first transmission.
7.
Write the data to send in the USART_TDR register. Repeat this for each data to be
transmitted in case of single buffer.
8.
When the last data is written to the USART_TDR register, wait until TC = 1.
This check is required to avoid corrupting the last transmission when the USART is
disabled or enters Halt mode.
Universal synchronous/asynchronous receiver transmitter (USART/UART)
communication.
When FIFO mode is disabled, writing a data to the USART_TDR clears the TXE
flag.
When FIFO mode is enabled, writing a data to the USART_TDR adds one data to
the TXFIFO. Write operations to the USART_TDR are performed when TXFNF
flag is set. This flag remains set until the TXFIFO is full.
When FIFO mode is disabled, this indicates that the transmission of the last frame
is complete.
When FIFO mode is enabled, this indicates that both TXFIFO and shift register are
empty.
RM0453 Rev 2
Section 35.5.10: USART
1127/1454
1257

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Stm32wl5 seriesStm32wl54 series

Table of Contents

Save PDF