IMXRT1024 LPUART Get Send/Receive Count

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

IMXRT1024 LPUART Get Send/Receive Count

跳至解决方案
2,155 次查看
Lukas_Frank
Senior Contributor I

Hi all, 

I am really stucked about how can I get receive or send count in data transfer. I have three question :

 

Q1 : How can I get send or receive data size on bus while I am using LPUART_WriteByte and LPUART_ReadByte? Like LPUART_TransferGetSendCount and LPUART_TransferGetReceiveCount?

Q2: I am not able to get receive count in LPUART hardware flow control example in SDK what is the correct usage of that? I am calling

  • int32_t count = 0;
  • LPUART_TransferGetReceiveCount(DEMO_LPUART,&g_lpuartHandle,&count);

lines after LPUART_TransferSendNonBlocking function.

Q3: In my case main purpose is detecting incoming byte count in LPUART Polling approach. Then I want to read bytes as many as detected count. How can I do that? I know RXCOUNT mask can help to me but I wonder about How can I catch or detect exact byte count that coming to the bus?

Thanks and Regards.

0 项奖励
回复
1 解答
2,123 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @Lukas_Frank,

Unfortunately, the UART protocol doesn't have a way to know the size of the incoming data unless you communicate previously from the other side. So you could try to sent first the size of the incoming data.

Best Regards,

Alexis Andalon

在原帖中查看解决方案

0 项奖励
回复
1 回复
2,124 次查看
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @Lukas_Frank,

Unfortunately, the UART protocol doesn't have a way to know the size of the incoming data unless you communicate previously from the other side. So you could try to sent first the size of the incoming data.

Best Regards,

Alexis Andalon

0 项奖励
回复