Hello,
Using TI-RTOS, I configure the UART0 of the TIVA TM4C123G LaunchPad to send and receive characters to and from the computer hyper-terminal. I also configure the uDMA (with TivaWare) to feed the UART TX register. The mechanism properly works, but the uDMA does not trigger an interrupt on completion. This mechanism is worthless to my application without the interrupt. Does someone can help me to figure this out?
I read that the uDMA interrupt must be configured through the associated peripheral. See my configuration below. Note that TI-RTOS enables the peripherals and allocates the uDMA control table.
#define COMPUTER_DMA_CHANNEL UDMA_CH9_UART0TX
#define COMPUTER_UART_REGISTER UART0_DR_R
//Configure DMA
uDMAChannelAttributeDisable(COMPUTER_DMA_CHANNEL, UDMA_ATTR_ALL);
uDMAChannelControlSet(COMPUTER_DMA_CHANNEL | UDMA_PRI_SELECT,
UDMA_SIZE_8 |
UDMA_SRC_INC_8 |
UDMA_DST_INC_NONE |
UDMA_ARB_1);
uDMAChannelAssign(COMPUTER_DMA_CHANNEL);
//Configure UART
UART_Params_init(&uartParams);
uartParams.writeMode = UART_MODE_CALLBACK;
uartParams.readMode = UART_MODE_CALLBACK;
uartParams.writeDataMode = UART_DATA_TEXT;
uartParams.readDataMode = UART_DATA_TEXT;
uartParams.writeCallback = uart_tx_computer_cb;
uartParams.readCallback = uart_rx_computer_cb;
uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readEcho = UART_ECHO_ON;
obj.computer.uart_h = UART_open(Board_UART, &uartParams);
UARTDMAEnable(UART0_BASE, UART_DMA_TX);
UART_read(obj.computer.uart_h, &uart_input, 1);
//Trigger the uDMA transfer
uDMAChannelTransferSet(COMPUTER_DMA_CHANNEL | UDMA_PRI_SELECT,
UDMA_MODE_BASIC,
string,
(void*)&COMPUTER_UART_REGISTER,
size);
uDMAChannelEnable(COMPUTER_DMA_CHANNEL);
I would greatly appreciate if someone can help me.
Regards,