Hi all,
I am using MKE15Z265VLL7 FRDM board and trying to use the DMA for uart .
DMA0 channel 2 for tx and DMA0 channel 3 for rx. the sequence for loopback is to call send api and after some delay calling receive api. and tx and rx is shorted using cable.
if is try this sequence send-delay-receive data is not receiving on receive api.
But if i try the sequence receive-delay-send then data is received on receive api.
So please if any one is having any suggestion please let me know.
Attached the code snippet from nxp code.
with this it is not receiving any data on rx line.
if i try this then i can see the data on rx line.
Thanks in advanced.
I am Miguel, I will support you with your case.
This issue could be that the UART buffer is full, this could be why sending-delay-reading doesn’t work and receiving-delay-send works fine. You could try changing the logic on your code and make more use of the registers flags to make sure the buffer and DMA are ready to transmit and receive data.
You can verify that the buffer is empty with the peripherals tool on DATA register or you could validate the flags (check reference manual, TC, RDRF, TDRE) on the STAT register.
Let us know if this resolve your issue.
Best regards,
Miguel.
Used status register to wait until transmission complete and reception but still having same issue..
Could you help me verifying that the data buffer is empty before sending data (RDRF and TDRE).
I'll be investigating more about your issue.
Miguel.