diff --git a/embassy-stm32/src/timer/low_level.rs b/embassy-stm32/src/timer/low_level.rs index 294dff7ea..aa73986ea 100644 --- a/embassy-stm32/src/timer/low_level.rs +++ b/embassy-stm32/src/timer/low_level.rs @@ -321,6 +321,11 @@ impl<'d, T: CoreInstance> Timer<'d, T> { } } } + + /// Get the clock frequency of the timer (before prescaler is applied). + pub fn get_clock_frequency(&self) -> Hertz { + T::frequency() + } } impl<'d, T: BasicNoCr2Instance> Timer<'d, T> {