Usart Continuous Communication In Dma Mode; Figure 333. Irda Data Modulation (3/16) -Normal Mode - STMicroelectronics RM0365 Reference Manual

Advanced arm-based 32-bit mcus
Table of Contents

Advertisement

Universal synchronous asynchronous receiver transmitter (USART)
29.5.15

USART continuous communication in DMA mode

The USART is capable of performing continuous communication using the DMA. The DMA
requests for Rx buffer and Tx buffer are generated independently.
Note:
Please refer to
mode is supported. If DMA is not supported, use the USART as explained in
USART transmitter
communication, the user can clear the TXE/ RXNE flags In the USART_ISR register.
Transmission using DMA
DMA mode can be enabled for transmission by setting DMAT bit in the USART_CR3
register. Data is loaded from a SRAM area configured using the DMA peripheral (refer to
Section 12: Direct memory access controller (DMA) on page
register whenever the TXE bit is set. To map a DMA channel for USART transmission, use
the following procedure (x denotes the channel number):
1.
Write the USART_TDR register address in the DMA control register to configure it as
the destination of the transfer. The data is moved to this address from memory after
each TXE event.
2.
Write the memory address in the DMA control register to configure it as the source of
the transfer. The data is loaded into the USART_TDR register from this memory area
after each TXE event.
3.
Configure the total number of bytes to be transferred to the DMA control register.
4.
Configure the channel priority in the DMA register
5.
Configure DMA interrupt generation after half/ full transfer as required by the
application.
6.
Clear the TC flag in the USART_ISR register by setting the TCCF bit in the
USART_ICR register.
7.
Activate the channel in the DMA register.
When the number of data transfers programmed in the DMA Controller is reached, the DMA
controller generates an interrupt on the DMA channel interrupt vector.
In transmission mode, once the DMA has written all the data to be transmitted (the TCIF flag
is set in the DMA_ISR register), the TC flag can be monitored to make sure that the USART
871/1080

Figure 333. IrDA data modulation (3/16) -Normal Mode

Section 29.4: USART implementation on page 837
or
Section 29.5.3: USART
DocID025202 Rev 7
to determine if the DMA
receiver. To perform continuous
183) to the USART_TDR
RM0365
Section 29.5.2:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents