-
Notifications
You must be signed in to change notification settings - Fork 935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pico_stdin: Increase sleeping time for stdin read #575
Conversation
Can you rebase against the |
This solve an issue where USB serial seems to hang when using a function like getchar()
can you provide an example where this hangs - how did you pick 10 rather than 1? |
I was running this code: #include <stdio.h>
#include "pico/stdlib.h"
int main() {
stdio_init_all();
while (true) {
char c = getchar();
if (c == 'a') {
printf("You sent a!\n");
} else {
printf("You did not send a!\n");
}
}
return 0;
} When I run this code on my pico with no other changes, it will not respond to any usb serial input. I changed it to 10, but maybe a lower value will also work, I didn't do much testing on different values |
moving to 1.2.1 if i can reproduce |
does it make a difference whether you start by physically resetting the Pico, reloading via SWD or dragging a UF2? |
moving out of 1.3.0 as this isn't really reproducable (Seems to be the host stack getting into a bad state?) see however https://forums.raspberrypi.com/viewtopic.php?f=145&t=321326 |
closing this in favor of issue #623 |
This solve an issue where USB serial seems to hang when using a function like getchar()