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

Implement support for XipCS1 pin function. #873

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Conversation

Altaflux
Copy link
Contributor

Implement support for XipCS1 pin function which is necessary to implement support for external ram or flash.

Note: The rp235x-pac is missing function select definition for XipCS1:
https://github.com/rp-rs/rp235x-pac/blob/main/svd/RP2350.yaml#L321

But FUNCSEL_A::GPCK has the same value (9). We should add a variant specific for XipCS1.

@Altaflux
Copy link
Contributor Author

Hey @thejpster let me know if there is anything else you would like to be changed or if you would like to wait until rp-rs/rp235x-pac#7 gets addressed.

thanks

@Altaflux Altaflux changed the title wip: Implement support for XipCS1 pin function. Implement support for XipCS1 pin function. Nov 21, 2024
@thejpster
Copy link
Member

Looks ok. I'd like to try it though. Do you have an example?

@Altaflux
Copy link
Contributor Author

I am not sure how to test it without a Pimoroni Pico Plus 2. I use this functionality on my project to enable its PSRAM.
Here is the relevant code, I know for a fact that not setting the pin 47 to the correct function will not let PSRAM be initialized:

https://github.com/Altaflux/gb-rp2350/blob/main/src/main.rs#L375
https://github.com/Altaflux/gb-rp2350/blob/main/src/hardware/psram.rs

If you have a Pimoroni Pico Plus 2 I am more than happy to build a sample project for the PSRAM only for you to test if you want to.

@thejpster
Copy link
Member

If you have a Pimoroni Pico Plus 2

I do. I used it to run the Neotron OS demo at RustConf, as it happens.

@Altaflux
Copy link
Contributor Author

Altaflux commented Dec 2, 2024

@thejpster sorry for the delay, got caught up with other work.
I have built a sample project that uses FunctionXipCs1 to enable the usage of the PSRAM module of a Pimoroni Pico Plus 2.
It uses the PSRAM as the Heap for the example code (based on the alloc.rs example from rp235x-hal-examples).

https://github.com/Altaflux/rp2350-psram-test

@thejpster
Copy link
Member

The LED is blinking away! Gosh I wish we had probe-rs and defmt working though.

@thejpster thejpster merged commit e78fa4c into rp-rs:main Dec 6, 2024
49 checks passed
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

Successfully merging this pull request may close these issues.

3 participants