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
After configuring clocks with embassy-stm32, peripheral clock frequencies are available through the .frequency() methods of the corresponding peripherals. However, there seems to be no way for user code to find out the system clock frequency.
Ah yes, I've run into this a couple of times as well. Would be nice to get access to the clocks (also more than just the system clock).
I guess the reason it's not public is because it's not considered a stable API.
After configuring clocks with embassy-stm32, peripheral clock frequencies are available through the
.frequency()
methods of the corresponding peripherals. However, there seems to be no way for user code to find out the system clock frequency.Internal embassy-stm32 code is able to use the private
get_freqs()
method for this:https://github.com/search?q=repo%3Aembassy-rs%2Fembassy%20unsafe%20%7B%20crate%3A%3Arcc%3A%3Aget_freqs()%20%7D.sys&type=code
Would it be possible to provide a public RCC method which returns the system clock frequency?
I would be happy to attempt the implementation if this is deemed desirable.
The text was updated successfully, but these errors were encountered: