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

SDK • Re: [RP2040] sleep_us waits forever

$
0
0
However, when I get to the sleep_ms(1000) part, it never returns, and seems to be stuck in the while loop linked above.
I have also experienced this behaviour when debugging, getting stuck at the exact same line. Writing 0 to the DBGPAUSE register of the system timer seems to "fix" the problem. This can be done by adding the following to the top of the main function:

Code:

timer_hw->dbgpause = 0;
I didn't recall having this problem a few years back, with older versions of the SDK. I haven't yet tried bisecting to find the cause…

Statistics: Posted by ConfuSomu — Fri Aug 15, 2025 9:35 pm



Viewing all articles
Browse latest Browse all 8621

Trending Articles