You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let gpin0:Pin<Gpio20,FunctionClock,PullNone> = pins.gpio20.reconfigure();
clocks
.system_clock.configure_clock(&gpin0,12.MHz())// 12 MHz is I guess a placeholder, true frequency is unknown (and unnecessary to be known) for my application..unwrap();
I could of course set this clock up manually, but I'd like to use the rp-hal functions for switching clocks as they already implement switching the glitchy mux correctly. If some other way of nicely doing this is already available I'd love to hear about it!
The text was updated successfully, but these errors were encountered:
You might be the first person to try this. I guess when the clock is coming from an external GPIO pin we have to rely on the user to tell us what the clock rate is, and to store that value somewhere for use later (e.g. when calculating UART baud rate dividers).
I would be happy to accept a PR to make this use-case work better.
Minimal example:
Triggers this todo: https://github.com/rp-rs/rp-hal/blob/main/rp2040-hal/src/clocks/clock_sources.rs#L79
I could of course set this clock up manually, but I'd like to use the rp-hal functions for switching clocks as they already implement switching the glitchy mux correctly. If some other way of nicely doing this is already available I'd love to hear about it!
The text was updated successfully, but these errors were encountered: