IMXRT1024 LPUART Get Send/Receive Count

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

IMXRT1024 LPUART Get Send/Receive Count

ソリューションへジャンプ
2,154件の閲覧回数
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,122件の閲覧回数
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,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 件の賞賛
返信