zephyr/drivers/timer/Kconfig.mec5
Scott Worley 62d7db4d4d drivers: timer: mec5: Driver using Microchip RTOS timer as kernel tick
Timer driver using Microchip 32KHz based RTOS timer as the kernel
timer tick. The driver uses one of the 32-bit basic timers to
support the kernel's k_busy_wait API which is passed a wait
count in 1 us units. The 32-bit basic timer is selected by using
device tree chosen rtimer-busy-wait-timer set to the handle
of the desired 32-bit basic timer. If this driver is disabled,
the build system will select the ARM Cortex-M4 SysTick as the
kernel timer tick driver. The user should specify RTOS timer
as kernel tick by adding the compatible properity and setting
the status property to "okay" at the board or application level
device tree. The driver implements two internal API's for use
by the SoC PM. These two API's allow the SoC PM layer to disable
the timer used for k_busy_wait so the PLL can be disabled in
deep sleep. We used a custom API so we can disable this timer
in the deep sleep path when we know k_busy_wait will not be
called by other drivers or applications.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-10-22 20:41:32 +02:00

18 lines
654 B
Plaintext

# Copyright (c) 2024 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0
config MCHP_MEC5_KTIMER
bool "Microchip MEC5 HAL kernel timer"
default y
depends on DT_HAS_MICROCHIP_MEC5_KTIMER_ENABLED
select TICKLESS_CAPABLE
select SYSTEM_TIMER_HAS_DISABLE_SUPPORT
select ARCH_HAS_CUSTOM_BUSY_WAIT
help
This module implements a kernel timer device driver for the
Microchip MEC5 SoC. It makes use of two hardware timers.
The 32-bit 32 KHz based RTOS timer which is operational in
full power and deep sleep. Basic timer 5 is a 48 MHz based
32-bit down counter with frequency divider used for the
custom busy wait kernel API.