CN / EN
Doc Feedback
Thanks for your interest, welcome to contact us.
Thanks for your feedback

Introduction

To reduce code coupling and minimize firmware size, APP_DRV separates the DMA transmission mode of peripheral modules, which provides APIs for transmission in polling mode (app_xxx_transmit_sync), interrupt mode (app_xxx_transmit_async), and DMA mode (app_xxx_dma_transmit_async).

Taking the UART module as an example, the table below shows separation of DMA transmission for peripheral modules, with DMA mode setting, transmission, and control APIs added. Users can call these APIs for transmission in DMA mode.

Table 1 UART APIs
API SoC Series
GR551x GR5526 GR5x25 GR533x GR5405

UART

app_uart_init Y Y Y Y Y
app_uart_deinit Y Y Y Y Y
app_uart_transmit_async Y Y Y Y Y
app_uart_transmit_sync Y Y Y Y Y
app_uart_receive_async Y Y Y Y Y
app_uart_receive_sync Y Y Y Y Y
app_uart_transmit_sem_sync Y Y Y Y Y
app_uart_receive_sem_sync Y Y Y Y Y
app_uart_flush Y Y Y Y Y
app_uart_abort Y Y Y Y Y
app_uart_abort_transmit Y Y Y Y Y
app_uart_abort_receive Y Y Y Y Y
app_uart_get_handle Y Y Y Y Y
app_uart_dma_init Y Y Y Y Y
app_uart_dma_deinit Y Y Y Y Y
app_uart_dma_transmit_async Y Y Y Y Y
app_uart_dma_receive_async Y Y Y Y Y
app_uart_transmit_dma_sg_llp N Y Y N N
app_uart_receive_dma_sg_llp N Y Y N N
Note:

“Y” in Table 1 indicates that the corresponding item is supported, and “N” indicates not supported. The same applies to the following tables in this document.

Taking the UART module as an example, the figure below shows the DMA transmission process. Users need to call app_uart_dma_init to initialize DMA before calling app_uart_dma_transmit_async for data transmission in DMA mode.

Figure 1 DMA transmission process of the UART module

Scan to follow

Open WeChat, use "Scan" to follow.