Skip to content

Commit e5ded3d

Browse files
asm5878kartben
authored andcommitted
drivers: timer: Fix conversion issue in stm32 lptim timer
Using correct macro to convert stdby time in LPTIM counter Signed-off-by: Alessandro Manganaro <[email protected]>
1 parent fff5b49 commit e5ded3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/timer/stm32_lptim_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ void sys_clock_idle_exit(void)
627627
stdby_timer_us = counter_ticks_to_us(stdby_timer, stdby_timer_diff);
628628

629629
/* Convert standby time in LPTIM cnt */
630-
missed_lptim_cnt = (sys_clock_hw_cycles_per_sec() * stdby_timer_us) /
630+
missed_lptim_cnt = (CONFIG_STM32_LPTIM_CLOCK * stdby_timer_us) /
631631
USEC_PER_SEC;
632632
/* Add the LPTIM cnt pre standby */
633633
missed_lptim_cnt += lptim_cnt_pre_stdby;

0 commit comments

Comments
 (0)