diff --git a/sys/xtimer/xtimer_core.c b/sys/xtimer/xtimer_core.c index 97b336f0c4b547e528ffcf7c86381543a2eee958..92db65faab8c39d21e2cb908d2544432e7353804 100644 --- a/sys/xtimer/xtimer_core.c +++ b/sys/xtimer/xtimer_core.c @@ -482,6 +482,11 @@ overflow: if (timer_list_head) { /* schedule callback on next timer target time */ next_target = timer_list_head->target - XTIMER_OVERHEAD; + + /* make sure we're not setting a time in the past */ + if (next_target < (_xtimer_now() + XTIMER_ISR_BACKOFF)) { + goto overflow; + } } else { /* there's no timer planned for this timer period */