RTOS: SysTimer: Fix update_tick

pull/5548/head
Filip Jagodzinski 2017-11-09 16:42:55 +01:00
parent 74e0f95cd6
commit d83ed63a31
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ uint32_t SysTimer::get_tick()
uint32_t SysTimer::update_tick()
{
uint64_t new_tick = ticker_read_us(_ticker_data) * OS_TICK_FREQ / 1000000;
uint64_t new_tick = (ticker_read_us(_ticker_data) - _start_time) * OS_TICK_FREQ / 1000000;
if (new_tick > _tick) {
// Don't update to the current tick. Instead, update to the
// previous tick and let the SysTick handler increment it