I am testing data transfer from a microcontroller to a host PC using USB CDC ACM on the nRF5340.
Right after powering on the microcontroller, only the first packet takes longer than usual to complete data transfer.
Although I haven’t measured the exact time, the logs clearly show that it is slower than normal.
The conditions for this issue are:
- Immediately after powering on the microcontroller
- Only for the first packet
I am using a custom Python script for testing.
The process is: open the virtual COM port, send a command to the microcontroller via USB, and then the microcontroller sends data to the PC.
If I wait about 1 second after opening the port before sending the command to the microcontroller, this issue does not occur.
Questions:
- Is there any rule or recommended condition, such as needing to wait a few seconds after opening the port?
- Are there any other possible reasons why USB data transfer from the microcontroller might be delayed?
Best Regards.