I'm using BF537 and want to use UART DMA for transmission and leave the Rx interrupt based.
Can the UART DMA driver work in this setup?
As Andreas has suggested, from UART hardware perspective, it is possible to have UART Tx and Rx sides in core mode or DMA independently. But I think, not possible if you are using Device Drivers for coding it.
Refer UART device driver code available at <VDSP>\Blackfin\lib\src\drivers\uart
In your project you should either add "adi_uart_int.c" or "adi_uart_dma.c" file (not both).
You can find there that adding 'adi_uart_int.c' file builds "Interrupt driven UART driver"; while adding "adi_uart_dma.c" file builds DMA driven UART driver. These file includes a macro (ADI_UART_INT and ADI_UART_DMA respectively) based on which driver code in the "adi_uart.c" file is decided.
So, if you are using UART Device driver, then both Tx and Rx sides should be either in core mode or in DMA mode.
You can refer UART device driver documentation available at the path:
DMA transfer and core based RX (with interrupt) do work, for sure. You also can switch between core and DMA based transfers without re-configuring the UART interface. It is only about the ETBEI or ERBFI bits that control the two modes.
Are you asking for an example? If yes, check the code of EE-347.
My question was more about the ADI UART device driver. From the documentation I read, there are the interrupt based and the DMA based version of the device driver. In order to use the DMA based UART, the file adi_uart_dma.c needs to be included in the project.
However, if I understood correctly, when the project is built with adi_uart_dma.c, both the UART Rx and Tx become DMA based.
In my project, I need an Rx interrupt when <CR> is received, and I also need to process the Backspace etc.. Considering the input can be various length and the DMA interrupt is length based, I can't use DMA for Rx.
As a result, I need interrupt for Rx and DMA for Tx. Since the device driver can only be built either as both interrupt based or both DMA based. It seems to me that what I need can't be accomplished by using the device driver.
Retrieving data ...