EasyManuals Logo

ST STM32L4x6 User Manual

ST STM32L4x6
1693 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 #1186 background imageLoading...
Page #1186 background image
Universal synchronous asynchronous receiver transmitter (USART) RM0351
1186/1693 DocID024597 Rev 3
Figure 385. Configurable stop bits
Character transmission procedure
1. Program the M bits in USARTx_CR1 to define the word length.
2. Select the desired baud rate using the USARTx_BRR register.
3. Program the number of stop bits in USARTx_CR2.
4. Enable the USART by writing the UE bit in USARTx_CR1 register to 1.
5. Select DMA enable (DMAT) in USARTx_CR3 if multibuffer communication is to take
place. Configure the DMA register as explained in multibuffer communication.
6. Set the TE bit in USARTx_CR1 to send an idle frame as first transmission.
7. Write the data to send in the USARTx_TDR register (this clears the TXE bit). Repeat
this for each data to be transmitted in case of single buffer.
8. After writing the last data into the USARTx_TDR register, wait until TC=1. This
indicates that the transmission of the last frame is complete. This is required for
instance when the USART is disabled or enters the Halt mode to avoid corrupting the
last transmission.
Single byte communication
Clearing the TXE bit is always performed by a write to the transmit data register.
The TXE bit is set by hardware and it indicates:
The data has been moved from the USARTx_TDR register to the shift register and the
data transmission has started.
The USARTx_TDR register is empty.
The next data can be written in the USARTx_TDR register without overwriting the
previous data.
This flag generates an interrupt if the TXEIE bit is set.
When a transmission is taking place, a write instruction to the USARTx_TDR register stores
the data in the TDR register; next, the data is copied in the shift register at the end of the
currently ongoing transmission.
06Y9
/%&/ELWFRQWUROVODVWGDWDFORFNSXOVH
%LW6WDUWELW
6WRS
ELW
1H[W
VWDUW
ELW
3RVVLEOH
SDULW\ELW
'DWDIUDPH
1H[WGDWDIUDPH
&/2&.

1H[WGDWDIUDPH
ELWGDWD6WRSELW
ELWGDWD6WRSELWV
ELWGDWD6WRSELWV
%LW%LW%LW%LW%LW%LW%LW
%LW6WDUWELW

6WRS
ELWV
1H[W
VWDUW
ELW
3RVVLEOH
SDULW\ELW
'DWDIUDPH
%LW%LW%LW%LW%LW%LW%LW
1H[WGDWDIUDPH
%LW6WDUWELW

6WRS
ELWV
1H[W
VWDUW
ELW
3RVVLEOH
SDULW\ELW
'DWDIUDPH
%LW%LW%LW%LW%LW%LW%LW

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

ST STM32L4x6 Specifications

General IconGeneral
BrandST
ModelSTM32L4x6
CategoryMicrocontrollers
LanguageEnglish

Related product manuals