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

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:
Kaspar Schleiser 2020-09-23 14:14:52 +02:00 committed by GitHub
commit e719eaf97c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}
}
}
}