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:
- Once everything is started, UART0 sends to console the welcome message.
- Once it is sent completely, then UART0 request a RX transfer.
- When data is received (8 for default example, 128 for your case) then RX transfer will be finished and received data will be sent back.
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