RM0402
Universal synchronous receiver transmitter (USART) /universal asynchronous receiver
TX line
RXNE flag
DMA request
USART_TDR
DMA reads
USART_TDR
DMA TCIF flag
(transfer complete)
Software configures the
DMA to receive 3 data
blocks and enables
the USART
Error flagging and interrupt generation in multibuffer communication
In case of multibuffer communication if any error occurs during the transaction the error flag
will be asserted after the current byte. An interrupt will be generated if the interrupt enable
flag is set. For framing error, overrun error and noise flag that are asserted with RXNE in
case of single byte reception, there will be separate error flag interrupt enable bit (EIE bit in
the USART_CR3 register), which if set will issue an interrupt after the current byte with
either of these errors.
25.4.14
Hardware flow control
It is possible to control the serial data flow between 2 devices by using the nCTS input and
the nRTS output. The
RTS and CTS flow control can be enabled independently by writing respectively RTSE and
CTSE bits to 1 (in the USART_CR3 register).
Figure 265. Reception using DMA
Frame 1
Set by hardware
cleared by DMA read
F1
DMA reads F1
from USART_TDR
Figure 266
shows how to connect 2 devices in this mode:
Figure 266. Hardware flow control between 2 USARTs
USART 1
TX
TX circuit
nCTS
RX
RX circuit
nRTS
RM0402 Rev 6
Frame 2
F2
DMA reads F2
DMA reads F3
from USART_TDR
from USART_TDR
nRTS
nCTS
Frame 3
Set by hardware
The DMA transfer
is complete
(TCIF=1 in
DMA_ISR)
USART 2
RX
RX circuit
TX
TX circuit
F3
Cleared
by
software
ai17193c
MSv31169V1
797/1163
810
Need help?
Do you have a question about the STM32F412 and is the answer not in the manual?