400dc79326
On a stm32, When we use the k_busy_wait function to wait a delay (500us) just after an idle tickless period the delay could be lower than the requested one. Consecutive readings of the cycle counter made with the function k_cycle_get_32 juste after tickeless period provides erroneous values (value jump) after some time (100 us). To fix this issue we needs: - Add the update of clock_accumulated_count value in the _timer_idle_exit function. - Treat the case in the get_elapsed_count function when the reload value of the timer is set to a remaining value to wait until end of tick (see _timer_idle_exit) . In this case the time elapsed until the systick timer restart was not yet added to clock_accumulated_count. To retrieve a correct cycle count we must therefore consider the number of cycle since current tick period start and not only the cycle number since the timer restart. Fixes #6164 Signed-off-by: Holman Greenhand <greenhandholman@gmail.com> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
altera_avalon_timer_hal.c | ||
arcv2_timer0.c | ||
cortex_m_systick.c | ||
hpet.c | ||
loapic_timer.c | ||
native_posix_timer.c | ||
nrf_rtc_timer.c | ||
pulpino_timer.c | ||
riscv_machine_timer.c | ||
sys_clock_init.c | ||
xtensa_sys_timer.c |