bsps/arm: Fix ARMv7-M CPU counter

Read the current counter value again after we know that we had an
underflow.

Update #3456.
This commit is contained in:
Sebastian Huber
2019-04-08 11:59:29 +02:00
parent 2c09b71faf
commit b8a0a49672

View File

@@ -59,6 +59,7 @@ static uint32_t _ARMV7M_Clock_counter(ARMV7M_Timecounter *tc)
ticks = tc->ticks;
if ((systick->csr & ARMV7M_SYSTICK_CSR_COUNTFLAG) != 0) {
counter = systick->cvr;
ticks += interval;
tc->ticks = ticks;
}