USB CDC ACM how to do flow control for RX data - nrf5340

Hello,

 

    I am having an esp32 connected to nrf5340 and I am doing firmware update for the esp32 by bypassing the UART of esp32 via the USB CDC ACM of nrf5340.

So basically esp32 is connected to nrf5340 via UART and the usb of nrf5340 is connected to computer. 

When I get any data in ACM I am writing it to esp32 via uart and vice versa. 

But I am not able to control the in-flow of data via USB ACM and overflow is happening. 

I need to control the flow of data from computer to nrf5340 via USB ACM, how can I do it ?

I couldn't find any CTS macro.

Parents Reply
  • Hello,

       I foud the real issue. 

    When I am trying to send more bytes (more than 500 bytes)  from PC to the device via USB, then the device is getting stuck. I am trying the same exapmle of echo. From PC I am sending using pyserial and if I decrease the single packet size to around 300bytes, it is working non-stop without any issue. If I increase  to 400 it starts getting stuck very fast with in few ping-pong.

Children
Related