Tool/software:TI-RTOS
Hi all,
I'm using tm4c1294ncpdt board.I want to use the uart with udma.The datasheet shows: Peripherals with FIFOs serviced by the uDMA to transmit or receive data.So I want to use the uart rx fifo to trigger a transfer request. My trouble is tm4c has no available uart fifo address.The proess of transfering and receiving data by FIFOs is to read and wrtite UARTDR register instead. So how can I fill the scr address in the function:uDMAChannelTransferSet(); I just fill it with the address of UARTDR register.My program as follows:
BIOS_getCpuFreq(&sysfreq);
/* UART7 as RS485_3 */
SysCtlPeripheralEnable(SYSCTL_PERIPH_UART7);
GPIOPinConfigure(GPIO_PC4_U7RX);
GPIOPinConfigure(GPIO_PC5_U7TX);
GPIOPinTypeUART(GPIO_PORTC_BASE, GPIO_PIN_4 | GPIO_PIN_5);
UARTConfigSetExpClk(UART7_BASE, sysfreq.lo, baud, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE));
UARTEnable(UART7_BASE);
UARTIntEnable(UART7_BASE, UART_INT_DMARX);
UARTFIFOLevelSet(UART7_BASE,UART_FIFO_TX1_8, UART_FIFO_RX4_8);
IntEnable(INT_UART7);
UARTDMAEnable(UART7_BASE, UART_DMA_RX);
UARTIntClear(UART7_BASE, UART_INT_DMARX);
SysCtlPeripheralEnable(SYSCTL_PERIPH_UDMA);
uDMAEnable();
uDMAControlBaseSet(&MyDMAControlTable[0]);
uDMAChannelAssign(UDMA_CH20_UART7RX);
uDMAChannelAttributeEnable(UDMA_CH20_UART7RX, UDMA_ATTR_USEBURST | UDMA_ATTR_HIGH_PRIORITY );
uDMAChannelControlSet(UDMA_CH20_UART7RX | UDMA_PRI_SELECT, UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_8 | UDMA_ARB_8 | UDMA_NEXT_USEBURST);
uDMAChannelTransferSet(UDMA_CH20_UART7RX | UDMA_PRI_SELECT, UDMA_MODE_BASIC, (void *)(UART7_BASE + UART_O_DR), receivebuffer_runtime, UDMA_SIZE_8);
uDMAChannelEnable(UDMA_CH20_UART7RX);
uDMAChannelRequest(UDMA_CH20_UART7RX);
How to do witn the udam scr address with uart fifo ?
How can I use the udam with uart fifo in a right way ? The peripheral fifo is a effient way to tigger udma in burst mode, so I need the way to improve my uart udma efficiency.