EasyManuals Logo
Home>ST>Microcontrollers>STM32G474

ST STM32G474 User Manual

ST STM32G474
2126 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 #1700 background imageLoading...
Page #1700 background image
Low-power universal asynchronous receiver transmitter (LPUART) RM0440
1700/2126 RM0440 Rev 4
1. Write the LPUART_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 (or TXFNF if FIFO mode is enabled) 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 LPUART_TDR register from this memory area
after each TXE (or TXFNF if FIFO mode is enabled) 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 LPUART_ISR register by setting the TCCF bit in the
LPUART_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
LPUART communication is complete. This is required to avoid corrupting the last
transmission before disabling the LPUART or entering low-power mode. Software must wait
until TC=1. The TC flag remains cleared during all data transfers and it is set by hardware at
the end of transmission of the last frame.
Figure 564. Transmission using DMA
Note: When FIFO management is enabled, the DMA request is triggered by Transmit FIFO not full
(i.e. TXFNF = 1).
F2 F3F1
ai17192b
Software
configures DMA
to send 3 data
blocks and
enables USART
The DMA
transfer is
complete
(TCIF=1 in
DMA_ISR)
DMA writes
F1 into
USART_TDR
DMA writes
F2 into
USART_TDR
DMA writes
F3 into
USART_TDR
Software waits until TC=1
Set by hardware
Cleared
by
software
Set by
hardware
TX line
TXE flag
USART_TDR
DMA request
DMA writes
USART_TDR
DMA TCIF flag
(transfer
complete)
TC flag
Frame 1
Frame 2
Frame 3
Idle preamble
Set by hardware
cleared by DMA read
Set by hardware
cleared by DMA read
Set by hardware
Ignored by the DMA because
the transfer is complete

Table of Contents

Questions and Answers:

ST STM32G474 Specifications

General IconGeneral
BrandST
ModelSTM32G474
CategoryMicrocontrollers
LanguageEnglish

Related product manuals