Merge pull request #15003 from kaspar030/ztimer_now64_tick
ztimer/core: ensure half-period tick when ztimer_now64 is used
This commit is contained in:
commit
e719eaf97c
@ -295,11 +295,17 @@ static void _ztimer_update(ztimer_clock_t *clock)
|
|||||||
if (clock->list.next) {
|
if (clock->list.next) {
|
||||||
clock->ops->set(clock, clock->list.next->offset);
|
clock->ops->set(clock, clock->list.next->offset);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
if (IS_USED(MODULE_ZTIMER_NOW64)) {
|
||||||
|
/* ensure there's at least one ISR per half period */
|
||||||
|
clock->ops->set(clock, clock->max_value >> 1);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
clock->ops->cancel(clock);
|
clock->ops->cancel(clock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ztimer_handler(ztimer_clock_t *clock)
|
void ztimer_handler(ztimer_clock_t *clock)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user