Replies: 1 comment
-
have you tried not consume the data to see if the number go up. Host side terminal typically send data one bye one and your pico consume it too fast. If it is still the issue, make sure you bump up tinyusb to match the github latest. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using the following code to check for the number of received bytes on a RPi Pico (MicroPython):
On the Pico, I have two CDC points - one for the REPL, and one for serial over USB. No matter how much data I send to the CDC port, the
ttyacm_any()
function returns 1, if there's any data in the buffer waiting to be read. Once it is all consumed, the function returns 0.Another, possible linked behavior, is that reading from the device in a while loop returns false negatives:
If there's not a delay between reads, the
ttyacm.any()
function will return 0, and the loop will terminate. On a subsequent call, the function will return 1 again.Beta Was this translation helpful? Give feedback.
All reactions