In my repo https://github.com/martinkooij/pi-pico-getchar there is a short bit of code showing a program that hangs when entering characters via getchar().
The use of this call causes the pico to hang at random, but mostly before having entered 10 characters. This happens when compiled in RELEASE mode.
- When using the -DCMAKE_BUILD_TYPE=Debug flag in CMake it does work flawlessly.
- When explicitly using a tight loop with getchar_timeout_us(0) it also works without problem.