-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
If one compiles a program for RP2040/RP2350 in single core mode and tries to debug with pyocd, TIMER0 (and perhaps TIMER1 on RP2350) is not running because DBGPAUSE=7 which required both cores to be active.
In my case execution hangs in timer_busy_wait_until() which is called during USB initialization.
Target
- Development board: Pico2, RP2350
- Instruction Set Architecture: ARM
- IDE and version: Eclipse
- Toolchain and version: PicoSDK 2.2.0
Host
- Host OS: Linux
- Version: Debian testing
To Reproduce
- Use project https://github.com/rgrr/yapicoprobe as target software
- set configNUMBER_OF_CORES=1
- debug with pyocd
Expected behavior
I would expect that the target behaves the same with and without debugger. But as said, TIMER0 is not running in debug mode.
Solution
In single core mode invoke multicore_reset_core1() on startup. My actual fix:
int main(void)
{
#if configNUMBER_OF_CORES != 2
// this is actually just for debugging the probe firmware running with just one core (good for pyocd)
// allow to run TIMER0 even in debug pause which would otherwise be inhibited because TIMER0.DBGPAUSE=7
multicore_reset_core1();
#endifBut I think this fix belongs into FreeRTOS and not every user application.
But honestly I'm not sure if this is an SDK issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working