zephyr/drivers/timer
Holman Greenhand 400dc79326 timer: cortex_m: Fix the discontinuous readings of the cycle counter.
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>
2018-02-23 08:58:23 -06:00
..
CMakeLists.txt board: posix: add native_posix board definition 2017-12-27 14:16:08 -05:00
Kconfig kconfig: fix help text indentation 2018-01-08 08:08:45 -05:00
altera_avalon_timer_hal.c drivers: timer: Add Altera shim driver for timer soft IP 2017-11-17 07:46:40 -05:00
arcv2_timer0.c cleanup: rename fiber/task -> thread 2017-10-30 18:41:15 -04:00
cortex_m_systick.c timer: cortex_m: Fix the discontinuous readings of the cycle counter. 2018-02-23 08:58:23 -06:00
hpet.c
loapic_timer.c jailhouse: add support for x2APIC mode for all LOAPIC accesses 2017-11-07 08:58:49 -05:00
native_posix_timer.c native: timer bugfix in tickless mode part 2018-02-08 15:56:48 -08:00
nrf_rtc_timer.c timer: Corrected types in nRF system timer functions 2018-02-02 15:28:32 +01:00
pulpino_timer.c
riscv_machine_timer.c
sys_clock_init.c
xtensa_sys_timer.c kernel: SMP timer integration 2018-02-16 10:44:29 -05:00