Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7513

SDK • Strange behaviour in uart printf stemming from mutex, seen using freertos SMP.

$
0
0
I have 2 tasks pinned to 2 different cores, printing something in while loop. Expected output is to see alternating behaviour. But actually what is seen is core 1 takes stdout for 1 second and then core 0 takes it for the next second. The duration is quite fixed I believe due to PICO_STDIO_DEADLOCK_TIMEOUT_MS=1000.

Also if I don't use Freertos and then use multicore_launch to 2 cores the same task, it work as expected.

Currently in my setup with freertos I have to set PICO_STDOUT_MUTEX=0 and manual locking in user code to have the ideal behaviour.

Is freertos and stdout using conflicting hw_spinlocks?

Statistics: Posted by sidharth-458 — Wed Jan 14, 2026 6:05 am — Replies 0 — Views 26



Viewing all articles
Browse latest Browse all 7513

Trending Articles