-
Notifications
You must be signed in to change notification settings - Fork 237
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
External Oscillator #687
Comments
Unfortunately, the necessary settings for using an external clock on the XIN pin are not well documented. There's already a ticket open about that: raspberrypi/pico-feedback#322 Perhaps just try to disable the XOSC and see if it helps? |
Thanks for the link I will monitor that. Tried disabling the xosc, didn't make a difference. I did get it to work though. I lowered the output frequency of the sys pll to 100 MHz. I don't know why that is, I thought maybe voltage droop on vcc, but I don't see see any when setting pll output higher. hal::pll::PLLConfig {
vco_freq: 1600.MHz(),
refdiv: 1,
post_div1: 4,
post_div2: 4,
}, |
I'm realizing it's also possible it's clocking the SSI to fast for the flash I'm using at 125 MHz |
If that's really the case, you could build your own boot2 loader with a reduced flash speed. To do that, you'd need to set a larger divider in https://github.com/rp-rs/rp2040-boot2/blob/main/build.rs#L36 and then compile it following the instructions at https://github.com/rp-rs/rp2040-boot2#adding-or-changing-an-existing-bootloader |
According to this forum thread, the external oscillator should work without special configuration: And then, when using the XOSC, the startup code does wait for the oscillator to become stable. As you don't use the XOSC initialization code, this delay doesn't apply. Perhaps you need to wait a few ms for the external oscillator to become stable? Not sure why changing the PLL freq should help with that, though. |
Thanks I'll try that when I get a chance, from the datasheet my clock has up to a 5ms startup time so that is a definite possibility. For now 100 MHz is good enough for me so I've been putting this on the back burner, you're welcome to close this if you want and I'll comment if I make some progress. |
Hello,
I'm trying configure the RP2040 to use a 25MHz external oscillator, instead of the 12 MHz crystal + XOSC. I've made my own board to do this, and I've verified the external oscillator signal on an oscilloscope, however when the code configures the system clock the M0+ goes into lockup state.
If I change the system clock source to
rosc
everything works and I get a 1 MHz output on gpio output 2 so I believe the sys pll is setup properly.Any ideas on things to try would be greatly appreciated.
The text was updated successfully, but these errors were encountered: