Good morning
I am testing the example uart_edma_transfer for the SDK 2.0. On the FRDM K64.
I have modified the serial port, it is the 1 now. The pin mux are updated as well.
The buffer length is now 128.
I also initialize the tx buffer to some sequential numbers.
The source is attached.
I short on the board the PTC3 and PTC4, The pin 16 of J1 to the pin 4 of J2.
I see the data going out on the scope. The end of rx transfer is never got.
Suggestions....
Original Attachment has been moved to: uart_edma_transfer.c.zip
Hello,
Your modifications are correct, however, you are not seeing Rx transfer to be finished because it "never" received data.
Current example was created as follows:
As you are connection Rx to Tx, you are not "receiving data" on Rx once the welcome message has been sent. That is why Rx transfer never finishes.
You will need to send data to Rx after UART_ReceiveEDMA(DEMO_UART, &g_uartEdmaHandle, &receiveXfer); is called.
A simple workaround to "emulate" that user has sent data, would be:
/* If RX is idle and g_rxBuffer is empty, start to read data to g_rxBuffer. */
if ((!rxOnGoing) && rxBufferEmpty)
{
rxOnGoing = true;
UART_ReceiveEDMA(DEMO_UART, &g_uartEdmaHandle, &receiveXfer);
UART_SendEDMA(DEMO_UART, &g_uartEdmaHandle, &sendXfer);
}
And then you will be able to receive all data on your rxBuffer.
I hope this helps!
Regards,
Isaac