We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74e0f95 commit d83ed63Copy full SHA for d83ed63
rtos/TARGET_CORTEX/SysTimer.cpp
@@ -78,7 +78,7 @@ uint32_t SysTimer::get_tick()
78
79
uint32_t SysTimer::update_tick()
80
{
81
- 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;
82
if (new_tick > _tick) {
83
// Don't update to the current tick. Instead, update to the
84
// previous tick and let the SysTick handler increment it
0 commit comments