zephyr/drivers/timer
Ioannis Glaropoulos ea2324dd2a drivers: timer: SysTick: enforce proper min & max SysTick LOAD values
Similar to what we do in other timer drivers, the maximum ticks
supplied in z_clock_set_timeout(..) needs to be MAX_TICKS at
maximum, when K_FOREVER is supplied as argument to the function.

In addition to that, the value we load onto the SysTick LOAD
register shall be truncated to MAX_CYCLES. This is required
to prevent loading a trash value to LOAD register, as only
the lowest 24 bits may be safely written.

Finally, we move the enforcement of the minimum delay to be
programmed on LOAD (i.e. MIN_DELAY) at the end step of the
calculation of the cycles-to-be-programmed. This prevents
from misscalculating the delay, as any required adjustment
is applied at the end, after the delay is rounded up to
the next tick boundary.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2019-11-26 13:34:30 -06:00
..
altera_avalon_timer_hal.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
apic_timer.c drivers: apic_timer: fix include of system_timer.h 2019-06-27 10:51:32 -07:00
arcv2_timer0.c drivers: timer: fix the bug for SMP 2019-11-13 12:04:18 -08:00
cc13x2_cc26x2_rtc_timer.c drivers: timer: add RTC support as system clock for CC13X2/CC26X2 2019-09-19 13:43:10 -05:00
CMakeLists.txt driver: timer: st_stm32: add lptimer management to stm32xx series 2019-11-08 10:04:21 -06:00
cortex_m_systick.c drivers: timer: SysTick: enforce proper min & max SysTick LOAD values 2019-11-26 13:34:30 -06:00
hpet.c drivers: hpet: fix includes 2019-10-09 09:14:18 -04:00
Kconfig driver: timer: st_stm32: add lptimer management to stm32xx series 2019-11-08 10:04:21 -06:00
Kconfig.stm32_lptim kconfig: Fix up newly-introduced copy-pasted headers 2019-11-19 15:25:08 -05:00
legacy_api.h license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
litex_timer.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
loapic_timer.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
mchp_xec_rtos_timer.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
native_posix_timer.c kernel: rename z_arch_ to arch_ 2019-11-07 15:21:46 -08:00
nrf_rtc_timer.c drivers: timer: nrf_rtc_timer: fix lost ticks from unannounced elapsed 2019-11-26 08:23:50 -05:00
riscv_machine_timer.c drivers: timer: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 2019-07-24 15:10:02 +02:00
rv32m1_lptmr_timer.c drivers: timer: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 2019-07-24 15:10:02 +02:00
sam0_rtc_timer.c drivers: timer: Do not use CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC 2019-07-24 15:10:02 +02:00
stm32_lptim_timer.c driver: timer: st_stm32: add lptimer management to stm32xx series 2019-11-08 10:04:21 -06:00
sys_clock_init.c include: move system timer headers to include/drivers/timer/ 2019-06-25 15:27:00 -04:00
xlnx_psttc_timer.c kernel/sys_clock.h: Deprecate and convert uses of old conversions 2019-11-08 11:08:58 +01:00
xtensa_sys_timer.c headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00