Hi Dear Authorized,
I have a really big problem. I need strictly received byte count in my scenario but system is not returning correct byte value. What is the accurate way to obtain received byte count in IMXRT1064 with LPUART?
By the way, I am using lpuart_edma_rb_transfer SDK example. Built-In receivedBytes calculation in example is not returning correct received byte value. I just want to exact answer. Why I can’t getting such like a simple information?
It is also beneficial to express one issue. Built-In received byte calculation returning correct received byte for 3 debug cycle but after that it is returning like “4294966958”. And it is gradually decreasing. So, this is why I want to use LPUART_TransferGetReceiveCountEDMA method. But it is always returning “kStatus_NoTransferInProgress” despite a successful transmission is exist with another MCU.
I am looking forward to hearing from you.
Best and Regards.
Hi,
You can modify the EXAMPLE_RING_BUFFER_SIZE size to control each DMA transfer received byte nunber. With DMA trigger times number will calculate received byte count.
Mike
Hi @Hui_Ma ,
Why LPUART_TransferGetReceiveCountEDMA is not working correctly. Could you please help me about it ?
Thanks and Regards.
Hi,
I try to test LPUART_TransferGetReceiveCountEDMA() function with <lpuart_edma_transfer_m7> demo with RT1170 board.
I call LPUART_TransferGetReceiveCountEDMA() funciton with below code:
while (1)
{
/* If RX is idle and g_rxBuffer is empty, start to read data to g_rxBuffer. */
if ((!rxOnGoing) && rxBufferEmpty)
{
rxOnGoing = true;
LPUART_ReceiveEDMA(DEMO_LPUART, &g_lpuartEdmaHandle, &receiveXfer);
LPUART_TransferGetReceiveCountEDMA(DEMO_LPUART, &g_lpuartEdmaHandle, count_test);
}
It looks like that function does not work as expected.
When I set a breakpoint with this function and could find the count value changed.
Wish it helps.
Mike
Hi Dear @Hui_Ma ,
I am sorry but this doesn't work for me in IMXRT1064. When I set a breakpoint and go into debug to see value. It seems like function does not work expected.
What is the optimal way to acquire received byte from registers or anything else?
Thanks and Regards.