This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello!
I am trying to set up the DMA with UARTA1 in Ping-Pong mode. So far i didn't succeed in getting the whole thing working.
When i run the code the UART Interrupt Handler gets called. However my code breaks up after reaching the Ping-Pong setup the seccond time.
My occiloscope shows a constant 3.3 V level as outPut of my UART.
Here is my code ...
static void UARTIntHandler_1() { Message("\r\n [+] UARTIntHandler_1 ..."); if(!bTxDone_1) { MAP_UARTDMADisable(UARTA1_BASE,UART_DMA_TX); bTxDone_1 = true; } MAP_UARTIntClear(UARTA1_BASE,UART_INT_DMATX); } void main() { BoardInit(); bTxDone_1 = false; int i=0; unsigned char logicOne = 0xf8; //for (i=0 ;i < 384; i++) { while(i<384){ LEDBuffer[i] = logicOne; i++; } PinMuxConfig(); UDMAInit(); MAP_UARTIntRegister(UARTA1_BASE,UARTIntHandler_1); // LED MAP_UARTIntEnable(UARTA1_BASE,UART_INT_DMATX); // LED MAP_UARTConfigSetExpClk(CONSOLE,MAP_PRCMPeripheralClockGet(CONSOLE_PERIPH), UART_BAUD_RATE, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE)); InitTerm(); ClearTerm(); DisplayBanner(APP_NAME); Message("\r\n [+] STATE: WAITING FOR DMA ..."); Message("\r\n [+] INIT DMA TRANSMISSION"); /* MAP_UARTConfigSetExpClk(UARTA1_BASE,MAP_PRCMPeripheralClockGet(PRCM_UARTA1), UART_BAUD_RATE, (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE | UART_CONFIG_PAR_NONE)); */ MAP_UARTEnable(UARTA1_BASE); UARTFIFOLevelSet(UARTA1_BASE,UART_FIFO_TX1_8,UART_FIFO_TX7_8); // LED UARTFIFOEnable(UARTA1_BASE); // LED Message("\r\n [+] FIFO DONE"); while(1){ // Breaks after one iteration ... UDMASetupPingPongTransfer(UDMA_CH11_UARTA1_TX, // LED (void *) LEDBuffer[0], (void *) (UARTA1_BASE + UART_O_DR), (void *) LEDBuffer[8], (void *) (UARTA1_BASE + UART_O_DR), 8); Message("\r\n [+] PING PONG SET"); MAP_uDMAChannelEnable(UDMA_CH11_UARTA1_TX); Message("\r\n [+] DMACHANNEL ENABLED"); //MAP_UARTDMAEnable(UARTA0_BASE,UART_DMA_RX); MAP_UARTDMAEnable(UARTA1_BASE,UART_DMA_TX); // LED //Message("\r\n [+] DMA ENABLED"); //UDMAStartTransfer(UDMA_CH11_UARTA1_TX); // LED //Message("\r\n [+] WAITING FOR TRANSMISSION"); while(!bTxDone_1){ } } }
Would be very pleased for any hints or help,
best, Vinc