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

rp2350: Fix GlobalConfig for uart, rename func to match rp2040 #403

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

Grazfather
Copy link
Contributor

@Grazfather Grazfather commented Mar 7, 2025

The RP2350 adds an extra value for FUNCSEL for the GPIOs. This value, for some GPIOs, is a second uart use. We named the first .uart_first and the second .uart_second.

This naming made it so that we had to select either .uart (on rp2040) or .uart_first (on rp2350), which made the code messier than it needed to be.

Additionally, if using the GlobalConfiguration with a gpio set to a uart function, it would not work since our code naively set it to .uart, which didn't exist on rp2350.

Making the name the same for the functionality fixes the GlobalConfiguration.

Additionally, I cleaned up a bunch of examples and tested them on rp2350. The ones that work, I moved to the chip-agnostic-examples.

The GlobalConfiguration still will not work if trying to set a pin for a function that needs the FUNCSEL set to the second uart functionality. That can be done in a follow up, and I added TODOs appropriately.

@Grazfather Grazfather changed the title poc: GlobalConfiguration doesn't work for UART on rp2350 rp2350: Fix GlobalConfig for uart, rename func to match rp2040 Mar 8, 2025
@Grazfather Grazfather marked this pull request as ready for review March 9, 2025 15:15
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.

1 participant