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.

UART Communication Problem with EDMA3 on 6678

Hi,

I want to send and receive data from UART in 115200 baudrate with no parity and 1 stop bit on 6678 EVM with a rate of 50Hz. Also I want to receive interrupt when data is sent and received. I configured the interrupt controller and transmitted 100 byte from EVM to PC and observed data on a serial communication program (CommOperator) but when I continuously sent data from PC to EVM (using CommOperator) while transmitting data, I observed that interrupt mechansim collapsed. To solve this problem I sent data from UART using EDMA3. I need to trig EDMA3 in 50Hz frequency to send data while receiving data also in 50Hz.

I am sending my code in the attachment. In the code EDMA3 is triggered by resetting UART so I can not get receive interrupt while transmtting data with EDMA3. When UART is always enabled the code sends and receives data properly but it sends the redundant data in the buffer all the time but I want to send data when I triggered EDMA3. If you advice me if there is any other way to trig EDMA3 and on what to do to solve this problem I will be glad.

Regards,

Cigdem

MasterCore0.cpp
  • Cigdem,

    Please take a look at section "2.9 DMA Event Support" in UART user guide.

    For the Transmit event, there are two scenarios will trigger UART to send event to EDMA: 1-when TX FIFO is empty; 2-when UART is taken out of reset.

    When you observe the redundant data sending out by EDMA/UART, it may indicate once TX FIFO is empty, UART will trigger another event to EDMA right away to trigger another round of transfer.

    Without resetting the whole UART, you may disable UART TX only temporarily after each UART event. And you can enable UART TX again with your timer/clock event to synchronize in 50Hz or other place based on your system design. This way UART RX may still be alive while you disable TX.

    Hope it could work for you.


    void disableUartTX(void)
    {
    ((CSL_UartRegs*) CSL_UART_REGS)->PWREMU_MGMT &= ~(1<<14); //disable TX
    }

    void enableUartTX(void)
    {
    ((CSL_UartRegs*) CSL_UART_REGS)->PWREMU_MGMT |= (1<<14); //enable TX
    }

  • Hi Steven,

    I have tried your solution and the code works properly now. Thanks for your help.

    Regards,

    Cigdem