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

rp2040 / rp2350 xoscFreq setting is nonfuctional #4673

Open
cibomahto opened this issue Dec 30, 2024 · 0 comments
Open

rp2040 / rp2350 xoscFreq setting is nonfuctional #4673

cibomahto opened this issue Dec 30, 2024 · 0 comments
Labels
rp2040 RP2040 (Pi Pico, RP2040 Feather, etc) rp2350

Comments

@cibomahto
Copy link
Contributor

cibomahto commented Dec 30, 2024

The RP2040 and 2350 board files all specify a parameter for the external crystal frequency, xoscFreq. This appears to be so that a different external crystal could be used on a particular board.

Unfortunately, the PLL configurations for the system and USB clock are hard-coded to assume a 12MHz input clock, so this setting doesn't actually work. Finding an optimal setting for the PLL is complicated, and it's probably best not to do this on the fly during the startup code.

I can think of two straightforward solutions:

  1. Remove the xoscFreq setting. The majority of RP2040 or RP2350 designs should be expected to use a 12MHz crystal.
  2. Add the two PLL configurations to the board (or target) configuration, so that a custom crystal frequency can be used correctly.

I think option 1 better, unless someone has a board with a nonstandard clock that they need to support. I couldn't find examples of other machines/boards that support a similar feature. If either of these sound reasonable, I'd be happy to make a pull request.

cc @soypat @deadprogram

@cibomahto cibomahto changed the title rp2040 / rp2380 xoscFreq setting is nonfuctional rp2040 / rp2350 xoscFreq setting is nonfuctional Dec 30, 2024
@deadprogram deadprogram added rp2040 RP2040 (Pi Pico, RP2040 Feather, etc) rp2350 labels Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rp2040 RP2040 (Pi Pico, RP2040 Feather, etc) rp2350
Projects
None yet
Development

No branches or pull requests

2 participants