Whatever that you are trying to printf in time-critical code or interrupt code, dump the data into an array or something and print it out later in the main loop. I did that testing a rotary encoder, no issues at all when time- or performance-critical code is kept lean and mean.
The printf to USB UART stuff is quite complex -- the function has to copy your text elsewhere and queue it up for sending and so on, so it's best to always printf (or call complex functions) in the main code loop.
The printf to USB UART stuff is quite complex -- the function has to copy your text elsewhere and queue it up for sending and so on, so it's best to always printf (or call complex functions) in the main code loop.
Statistics: Posted by katak255 — Sun Jun 22, 2025 11:51 am