Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: timer: mec5: Driver using Microchip RTOS timer as kernel tick #79290

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

scottwcpg
Copy link
Collaborator

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.

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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Timer Timer platform: Microchip MEC Microchip MEC Platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants