Introduction
DMA transmission of peripheral modules is separated in the current APP_DRV (V1.5), 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). APP_DRV (V1.5) features less duplicated code, contributing to smaller firmware size, and provides more flexible API operations.
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.
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 |
“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.