zephyr/drivers/timer
Daniel DeGrasse f3a35c58d8 drivers: timer: mcux_gpt_timer: rewrite timer to use free run mode
GPT timer driver previously used "restart mode", where the timer would
count to a given value, then rollover. In this mode,  "Any write access
to the Compare register of Channel 1 will reset the GPT counter". Since
a write to the compare register takes affect after 1 cycle of the
module's bus clock, and the bus clock is not synchonized with the GPT
module's low frequency counter clock, writing to the compare register
will induce a counter reset, and can cause the GPT to lose time
synchronization. This can induce time drift over time.

To fix this, rework the GPT driver to use "free run" mode. Note that
free run mode is not used directly, rather the GPT is configured to
reset on a tick boundary at boot, and then the second compare register
is used to set capture points. This way, the GPT interrupt will always
fire at a tick boundary, and no calculations are needed to handle
the counter rollover.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-03-30 09:51:04 +02:00
..
altera_avalon_timer_hal.c
apic_timer.c
apic_tsc.c
arcv2_timer0.c
arm_arch_timer.c drivers/timer/arm_arch_timer: driver revamp 2023-03-02 15:37:35 -05:00
cc13x2_cc26x2_rtc_timer.c
CMakeLists.txt
cortex_m_systick.c cortex-m: warnings: Address -Wextra warnings 2023-02-19 20:58:44 -05:00
esp32c3_sys_timer.c drivers: timer: esp32c3: fix dtick counter increment 2023-03-09 17:22:34 +01:00
hpet.c timer: hpet: a few improvements 2023-03-28 07:26:08 -04:00
intel_adsp_timer.c
ite_it8xxx2_timer.c
Kconfig drivers: kconfig: unify menuconfig title strings 2023-03-28 15:06:06 +02:00
Kconfig.altera_avalon
Kconfig.apic
Kconfig.arcv2
Kconfig.arm_arch
Kconfig.cavs
Kconfig.cc13x2_cc26x2_rtc
Kconfig.cortex_m_systick
Kconfig.esp32c3_sys
Kconfig.hpet timer: Revert "timer: HPET is also a lock free readable timer" 2022-11-01 23:15:23 +09:00
Kconfig.ite_it8xxx2
Kconfig.leon_gptimer
Kconfig.litex
Kconfig.mchp_xec_rtos
Kconfig.mcux_gpt soc: arm: nxp: switch imxrt boards to use systick timer unless CONFIG_PM=y 2022-12-16 09:31:48 +01:00
Kconfig.mcux_lptmr drivers: timer: mcux: lptmr: add dependency on CONFIG_PM 2023-01-31 22:10:28 -06:00
Kconfig.mcux_os
Kconfig.mips_cp0
Kconfig.native_posix
Kconfig.npcx_itim
Kconfig.nrf_rtc drivers: timer: nrf_rtc_timer: Add guard against conflict 2023-03-27 22:15:15 +00:00
Kconfig.rcar_cmt
Kconfig.riscv_machine drivers: timer: Machine timer driver enablement for NIOSV 2023-02-20 09:29:13 -05:00
Kconfig.rv32m1_lptmr
Kconfig.sam0_rtc
Kconfig.stm32_lptim
Kconfig.xlnx_psttc
Kconfig.xtensa
leon_gptimer.c
litex_timer.c
mchp_xec_rtos_timer.c
mcux_gpt_timer.c drivers: timer: mcux_gpt_timer: rewrite timer to use free run mode 2023-03-30 09:51:04 +02:00
mcux_lptmr_timer.c
mcux_os_timer.c
mips_cp0_timer.c
native_posix_timer.c
npcx_itim_timer.c
nrf_rtc_timer.c hal_nordic: Change scheme for RTC and TIMER reservation 2023-03-20 16:59:40 +01:00
rcar_cmt_timer.c
riscv_machine_timer.c riscv: timer: driver revamp 2023-02-21 18:04:55 -05:00
rv32m1_lptmr_timer.c
sam0_rtc_timer.c
stm32_lptim_timer.c drivers: timer: stm32_lptim: fix sys_clock_* return value 2023-02-27 17:31:03 +01:00
sys_clock_init.c
xlnx_psttc_timer_priv.h
xlnx_psttc_timer.c
xtensa_sys_timer.c