![Geehy SEMICONDUCTOR APM32F405 Series Скачать руководство пользователя страница 329](http://html1.mh-extra.com/html/geehy-semiconductor/apm32f405-series/apm32f405-series_user-manual_573630329.webp)
www.geehy.com Page 328
enabled. If RTS flow control is enabled, when the receiver receives data, nRTS
will be pulled to low level. When a data frame is received, nRTS will becomes
high to inform the transmitter to stop transmitting data frame.
DMA multi-processor communication
USART can access the data buffer in DMA mode in order to reduce the burden
of processors.
Transmission in DMA mode
DMATXEN bit of USART_CTRL3 register determines whether to transmit in
DMA mode. When transmitting by DMA, the data in the designated SRAM will
be transmitted to the buffer by DMA.
Configuration steps of transmission by DMA:
Clear the TXCFLG bit of USART_STS register.
Set the address of SRAM memory storing data as DMA source
address.
Set the address of USART_DATA register as DMA destination
address.
Set the number of data bytes to be transmitted.
Set channel priority.
Set interrupt enable.
Enable DMA channel.
Wait for TXCFLG bit of USART_STS register to be set to 1, indicating
transmission completion.
Receive in DMA mode
DMARXEN bit of USART_CTRL3 register determines whether to use DMA
mode to receive; when DMA is used to receive, every time one byte is received,
the received buffer data will be transmitted to the specified SRAM area by DMA.
Configuration steps of receiving by DMA:
Set the address of USART_DATA register as DMA source address.
Set the address of SRAM memory storing data as DMA destination
address.
Set the number of data bytes to be transmitted.
Set channel priority.
Set interrupt enable.
DMA channel enable.