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

Support RP2350 #9

Open
thejpster opened this issue Sep 2, 2024 · 6 comments
Open

Support RP2350 #9

thejpster opened this issue Sep 2, 2024 · 6 comments

Comments

@thejpster
Copy link

The Raspberry Pi RP2350's Hazard3 RISC-V code includes the Xh3irq interrupt controller, which automatically works out which interrupt should be handled next according to their priorities and pending states.

I wrote a driver for it in this PR: rp-rs/rp-hal#847.

Perhaps we could support the RP2350 here, using that.

@romancardenas
Copy link
Owner

Thanks for opening the issue! Does this target have a MachineSoft interrupt source? I did a very quick check and only found references to MachineExternal.

@thejpster
Copy link
Author

https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf#reg-rvcsr-MIE

You can you turn it on. Haven't tried it.

@romancardenas
Copy link
Owner

Will take a look and see how it works. Sounds like it is feasible to support this target 😁

@romancardenas
Copy link
Owner

Looks like we can use the RISCV_SOFTIRQ register of the SIO module:

Screenshot 2024-09-04 at 10 04 25

@thejpster
Copy link
Author

thejpster commented Sep 4, 2024

That sounds like it lets you set SIP on the other core or the current core. I suspect there is also a CSR which only lets you set SIP on the current core.

@romancardenas
Copy link
Owner

romancardenas commented Sep 8, 2024

Please take a look at this PR, maybe it is enough for RP2350 😀

I still want to do more tests etc., but it is potentially an all-in-one solution

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