Hello everyone,
Board - TM4C1294XL
Well I came across a problem which I cannot get around in any way. The problem has to do with the DMATXRIS on the UART, raw interrupt to the DMA transfer done to the UART TX and it never clears.
Every time I enable the DMA for the TX FIFO that behavior occurs. Like this:
UARTDMAEnable(UART0_BASE, UART_DMA_TX);
I simplified the code to seek the problem to no avail. The DMA initialization function is not called for the test code I am using to seek the problem. I did try with the DMA initialized before the Init_UART0() function-
Right now I have the main() doing:
- setting the clock to 120Mhz
- Initializing the systick (interrupt every 1ms)
- Calling Init_UART0().
My Init_UART0() can be seen bellow:
void Init_UART0(void)
{
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
MAP_GPIOPinConfigure(GPIO_PA0_U0RX);
MAP_GPIOPinConfigure(GPIO_PA1_U0TX);
MAP_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);
//MAP_UARTConfigSetExpClk(UART0_BASE, ClockFreq, 115200,
// (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |UART_CONFIG_PAR_NONE));
UARTStdioConfig(0, 115200, ClockFreq);
MAP_UARTFIFOLevelSet(UART0_BASE, UART_FIFO_TX4_8, UART_FIFO_RX4_8);
/*
* After this line of code the DMATXRIS always set's to 1.
*/
UARTDMAEnable(UART0_BASE, UART_DMA_TX);
uint32_t flags = UARTIntStatus(UART0_BASE,0);
MAP_UARTIntClear(UART0_BASE,flags);
//MAP_UARTIntEnable(UART0_BASE, UART_INT_DMATX);
/* */
UARTIntRegister(UART0_BASE,UART0_Handler); // não há MAP pelos vistos
//MAP_IntEnable(INT_UART0);
counter = 0;
UARTEnable(UART0_BASE);
}
I also tried the same with the UART1.
I checked the Errata and the datasheet multiple times to find nothing. Could there be a problem with either my board? Help would be appreciated :)