1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

ztimer/core: ensure half-period tick when ztimer_now64 is used

This commit is contained in:
Kaspar Schleiser 2020-09-09 12:49:25 +02:00
parent c270aadc00
commit 18852cf30c

View File

@ -296,7 +296,13 @@ static void _ztimer_update(ztimer_clock_t *clock)
clock->ops->set(clock, clock->list.next->offset);
}
else {
clock->ops->cancel(clock);
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 {
clock->ops->cancel(clock);
}
}
}
}