Skip to content

RP2350 PIO: Cant select IRQ as STATUS source #4067

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

Open
TilBlechschmidt opened this issue Apr 8, 2025 · 1 comment
Open

RP2350 PIO: Cant select IRQ as STATUS source #4067

TilBlechschmidt opened this issue Apr 8, 2025 · 1 comment

Comments

@TilBlechschmidt
Copy link
Contributor

TilBlechschmidt commented Apr 8, 2025

Hey there!

I was toying with the RP2350 PIOs and looking into "abusing" the mov _, STATUS instruction to transfer data between PIOs. This requires setting the two execctrl registers STATUS_N and STATUS_SEL both of which are configurable using the Config struct.

The StatusN struct has a variant for representing an IRQ index. However, I could not find a way to switch the select register. The StatusSource struct is missing a variant to represent the IRQ source and in the code which translates it into register writes I could not spot anything which sets the pac::pio::vals::ExecctrlStatusSel::IRQ value.


Is there another way to do this or is it indeed a missing feature? If so, I would be happy to create a PR for it 🙂

In my local version, I simply added a variant to the StatusSource struct and extended the match statement in ~L736. Based on my testing, this seems to work just fine.

Image

P.S.: If desired, I could add a minimal example of sending data between PIOs using just IRQs to the repo as well. See the not-yet-cleaned-up main.rs.txt.

@CBJamo
Copy link
Contributor

CBJamo commented Apr 9, 2025

You're correct, this is a missing feature. A PR would be very welcome.

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

2 participants