drivers: timer: stm32 lptimer revert static-prescaler

Revert "drivers: timer: lptim timer clock on stm32u5 has a prescaler"
This reverts commit c14670abea.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2023-11-23 14:26:10 +01:00 committed by Fabio Baltieri
parent 8146fe4f66
commit f1af7f13eb

View file

@ -387,19 +387,6 @@ static int sys_clock_driver_init(void)
return -EIO;
}
if (IS_ENABLED(DT_PROP(DT_DRV_INST(0), st_static_prescaler))) {
/*
* LPTIM of the stm32, like stm32U5, which has a clock source x2.
* A full 16bit LPTIM counter is counting 4s at 2 * 1/32768 (with LSE)
* Time base = (4s * freq) - 1
*/
lptim_clock_freq = lptim_clock_freq / 2;
}
/*
* Else, a full 16bit LPTIM counter is counting 2s at 1/32768 (with LSE)
* Time base = (2s * freq) - 1
*/
/* Actual lptim clock freq when the clock source is reduced by the prescaler */
lptim_clock_freq = lptim_clock_freq / LPTIM_CLOCK_RATIO;