Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RP235x] various hangs when using multicore #3839

Open
wowkster opened this issue Feb 3, 2025 · 2 comments
Open

[RP235x] various hangs when using multicore #3839

wowkster opened this issue Feb 3, 2025 · 2 comments

Comments

@wowkster
Copy link
Contributor

wowkster commented Feb 3, 2025

I've observed various different hangs when attempting to use core 1 on both the RP2350A and RP2350B. Specifically I've noticed async SPI on core 1 will hang (the core 1 executor continues to run but the task awaiting the SPI future will never be woken up), and channels will hang on the sender side when sending from core 0 to core 1. Neither of these happen 100% of the time but enough that it makes it almost impossible to use the second core reliably.

I've written an minimal reproducible example that works on a bare Pico 2 from my testing. Given the nature of the bug, it's hard to tell if it could be related to the critical section implementation, the executor implementation, or something else entirely.

@Dirbaio
Copy link
Member

Dirbaio commented Feb 4, 2025

seems to be something with cross-core wakes. In the repro above the wake from DMA seems to get lost. By default the DMA irq is handled in core0, which then wakes the task in core1.

This hangs pretty reliably: https://gist.github.com/Dirbaio/c04beb4d5e08a8508f430227cf626802

We haven't been able to repro on rp2040 yet, so it's unclear if it's a bug new to the rp235x

@jamesmunns
Copy link
Contributor

Might be worth trying to disable timer.dbgpause on any relevant timers, it's possible that the debug core logic has changed between both parts, if you are using RTT (and scanning the ring buffer pointers) it might register the debug core as "active"?

https://forums.raspberrypi.com/viewtopic.php?t=380245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants