PN7462 long HSUART input stream handling with hardware flow control

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN7462 long HSUART input stream handling with hardware flow control

2,410 Views
gaurangk
Contributor I

Hi,

We are using PN7462C EVK for testing purposes. We want to develop a use case where any length of the HIF HSU input stream can be handled in PN7462 firmware. As per our current HIF HSU configuration, We can successfully handle the HIF HSU input stream less than 250 Bytes(Less than HIF HSU receive buffer size). But We can not able to receive whole data when input stream is more than 250 bytes. As per our understanding, this scenario must be handled by hardware flow control. I have referred to https://www.nxp.com/docs/en/user-guide/UM10858.pdf  and found that on Page #277 below note,

Note that in case the host sends a frame longer than the buffer size, a buffer_overflow interrupt will be sent to the firmware. The RTS will not toggle to high. Data received after the error are not stored into memory. The error is signaled to the firmware by an interrupt.

Below is some scenario we have thought and tried along with issues we are facing in the scenario,

1. Handle buffer_overflow interrupt and toggle the RTS pin manually.

Que: We are unable to find a way to toggle the RTS pin from firmware. We may lose some data bytes in this scenario. 

How can we handle this scenario in PN7462 firmware?

Attached our HIF HSU configuration code snippets.

0 Kudos
5 Replies

1,814 Views
IvanRuiz
NXP Employee
NXP Employee

Hello, 

Please give some time to check this and come back to you.

BR,

Ivan.

0 Kudos

1,814 Views
gaurangk
Contributor I

Hi,

Is there any update on this?

0 Kudos

1,814 Views
IvanRuiz
NXP Employee
NXP Employee

Hi,

To handle a data stream of ANY size. That is not possible. The limitation is always the maximum buffer size. The internal buffer manager only will switch buffers (RX-0 to RX-3 buffer) if an EoF has been received (@see UM10858 [14.3.4 Buffer Manager]). 

One way would be to use hardware flow control CTS/RTS but that is tricky because at RTS the specification says that you have to have a certain margin because you cannot expect the host to stop immediately when the signal is raised. This should be considered in the customer design.

 

Instead of working with the Buffer Overflow IRQ, at this point it is already too late, we would rather recommend to use the waterlevel interrupt.

Hope it helps!

BR,

Ivan.

0 Kudos

1,799 Views
jayesh_joshi
Contributor IV

Hi Evan,

I am facing the same issue with hardware flow control. In my case, I am getting data up to 4kb of the continuous stream over HIF. 

You said that it can be achieved using RTS/CTS and waterlevel interrupt. I am familiar with waterlevel interrupt but how we can handle RTS/CTS with waterlevel.

Can you please with this?   

0 Kudos

1,814 Views
gaurangk
Contributor I

Hi,

Thanks for your response.

Can you please help me understand what should be taken care in hardware design in order to use hardware flow control with CTS/RTS pins?

What should we do differently in firmware to handle this?

Can't we exercise the same on the EVK?

0 Kudos