Hardware Flow Control; Figure 266. Reception Using Dma; Figure 267. Hardware Flow Control Between 2 Usarts - ST STM32F40 Series Reference Manual

Hide thumbs Also See for STM32F40 Series:
Table of Contents

Advertisement

Universal synchronous asynchronous receiver transmitter (USART)

Figure 266. Reception using DMA

TX line
RXNE flag
DMA request
USART_DR
DMA reads USART_DR
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 which 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.
26.3.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

Figure 267. Hardware flow control between 2 USARTs

RTS and CTS flow control can be enabled independently by writing respectively RTSE and
CTSE bits to 1 (in the USART_CR3 register).
779/1422
Frame 1
DMA reads F1
from
USART_DR
Figure 267
USART 1
TX
TX circuit
nCTS
RX
RX circuit
nRTS
Doc ID 018909 Rev 4
Frame 2
set by hardware
cleared by DMA read
F1
DMA reads F2
from
USART_DR
shows how to connect 2 devices in this mode:
RX
nRTS
TX
nCTS
Frame 3
F2
set by hardware
DMA reads F3
The DMA transfer
from
USART_DR
USART 2
RX circuit
TX circuit
RM0090
F3
cleared
by software
is complete
(TCIF=1 in
DMA_ISR)
ai17193b

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Stm32f41 seriesStm32f42 seriesStm32f43 seriesRm0090

Table of Contents

Save PDF