Hi all,
I'm trying to program a proper uDMA UART receive and transmit firmware, coming from the uDMA example:
// udma_demo.c - uDMA example.
// This is part of revision 2.1.0.12573 of the EK-TM4C1294XL Firmware Package.
Three points that caused me doubts:
1) Looking at the line
ROM_UARTFIFOLevelSet(UART1_BASE, UART_FIFO_TX4_8, UART_FIFO_RX4_8);
and at the comment below, right before the uDMA control set:
// The arbitration size is set to 4 to match the RX FIFO trigger threshold.
ROM_uDMAChannelControlSet(UDMA_CHANNEL_UART1RX | UDMA_PRI_SELECT,
UDMA_SIZE_8 | UDMA_SRC_INC_NONE | UDMA_DST_INC_8 |
UDMA_ARB_4);
I would expect that FIFO_TX4_8 means 4/8 of 16bytes, which is 8 bytes. So is that control set REALLY matching FIFO to arbitration? I can see that the program works, but assuming examples have such an importance as a learning platform, that seems confusing and misleading (or am I still confused will all the uDMA parameters???)
2) There's a line (579) which is
ROM_UARTIntEnable(UART1_BASE, UART_INT_DMATX | UART_INT_DMATX);
Again, program works as is, or after changing one of the same or'ed parameters to UART_INT_DMARX. Would RX be the correct setting?
3) Curiosity: I just noted that all my programs so far lack the enabling UARTEnable(UART1_BASE); And I have a lot of boards using lots of uarts! Is that set on by default, or have my programs been working by magic?
Happy Easter everyone!