Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
501
/
631
Figure 23-5 Sending using DMA
DMA reception
The steps for assigning a DMA channel to the LPUART receiving are as follows (x indicates the channel number) :
1.
Configure the LPUART_DAT register address as the source address for transmission and the memory address
as the destination address for transmission through the DMA configuration register.
2.
Configure the number of DMA bytes to be transferred.
3.
Configure the channel priority on the DMA register for data transfer.
4.
Configure interrupts to generate DMA interrupts when the transfer is half or all complete.
5.
Activate the channel.
When completing the transfer specified by the DMA controller, the DMA controller generates an interrupt on the
DMA channel's interrupt vector.
TX line
TXC flag
Data frame 0
Data frame 1
Data frame 2
Data0
Data1
Data2
Software enable
to send data
DMA writes Data0
in LPUART_DAT
DMA writes Data2
in LPUART_DAT
DMA writes Data1
in LPUART_DAT
Send stop bit
and set TXC
Set by hardware
Stop bit
Stop bit
Stop bit
DMA request
Transfer is over, DMA
controller ignores this request
TXC has been set, if the
software does not clear
LPUART_DAT