drivers: timer: stm32_lptim fix TICKLESS=n processing
based on PR#25412 Some kernel tests use `CONFIG_TICKLESS_KERNEL=n` with `CONFIG_SYS_CLOCK_TICKS_PER_SEC=1` to detect when a test runs longer than 1 second. These tests break if a tick is announced every time a timeout occurs. Only announce if the measured duration since the last tick is at least the duration of a tick. Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
parent
29ea09ee52
commit
7be27b5169
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ static void lptim_irq_handler(struct device *unused)
|
|||
/ LPTIM_CLOCK;
|
||||
|
||||
z_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL)
|
||||
? dticks : 1);
|
||||
? dticks : (dticks > 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue