| # Silicon Labs Counter driver config |
| |
| # Copyright (c) 2019, Piotr Mienkowski |
| # Copyright (c) 2026, Shontal Biton, Based on: |
| # Kconfig.mcux_lptmr, Copyright (c) 2020 Vestas Wind Systems A/S |
| # Copyright 2026 Silicon Laboratories Inc. |
| # SPDX-License-Identifier: Apache-2.0 |
| |
| DT_CHOSEN_SILABS_SLEEPTIMER := silabs,sleeptimer |
| |
| config COUNTER_SILABS_PROTIMER |
| bool "Silicon Labs PROTIMER Counter driver" |
| default y |
| depends on SOC_FAMILY_SILABS_S2 |
| depends on DT_HAS_SILABS_PROTIMER_ENABLED |
| depends on BUILD_ONLY_NO_BLOBS || \ |
| (ZEPHYR_HAL_SILABS_MODULE_BLOBS && SOC_GECKO_USE_RAIL) |
| help |
| Enable counter driver for Silicon Labs PROTIMER peripheral which |
| is used as the RAIL timer. With BUILD_ONLY_NO_BLOBS (e.g. twister builds), |
| non-functional stubs are used and the driver will not work on device. |
| When built with RAIL blobs, SOC_GECKO_USE_RAIL must be |
| enabled and RAIL must be initialized first. The PROTIMER lives |
| in the radio block and its clock is not enabled until RAIL init. |
| |
| |
| config COUNTER_GECKO_RTCC |
| bool "Silicon Labs Gecko Counter (RTCC) driver" |
| default y |
| depends on DT_HAS_SILABS_GECKO_RTCC_ENABLED |
| select SOC_GECKO_CMU |
| select SOC_GECKO_RTCC |
| help |
| Enable counter driver based on RTCC module for Silicon Labs Gecko |
| chips. |
| |
| config COUNTER_GECKO_STIMER |
| bool "Silicon Labs Gecko Counter Sleep Timer driver" |
| default y |
| depends on $(dt_chosen_enabled,$(DT_CHOSEN_SILABS_SLEEPTIMER)) |
| select SILABS_SISDK_SLEEPTIMER |
| help |
| Enable the counter driver for Sleep Timer module for Silicon Labs |
| Gecko chips. |
| |
| config COUNTER_SILABS_BURTC |
| bool "Silicon Labs Counter Backup Timer (BURTC) driver" |
| default y |
| depends on DT_HAS_SILABS_BURTC_COUNTER_ENABLED |
| select SILABS_SISDK_BURTC |
| help |
| Enable the counter driver for Backup Real Time Counter module |
| for Silicon Labs chips. |
| |
| config COUNTER_SILABS_BURTC_ALARM |
| bool "BURTC alarm support" |
| default y |
| depends on COUNTER_SILABS_BURTC |
| help |
| BURTC is a commonly used wake-up source for many Silabs MCUs and |
| may be used as the companion low-power timer for the Cortex-M |
| systick. Enabling single-shot alarm support requires reprogramming |
| the hardware compare register (COMP), which is the same |
| resource used for the periodic TOP callback. Because of this |
| hardware limitation, this Kconfig option selects whether alarm |
| support is enabled. When alarm support is enabled the driver will |
| not allow set TOP operation at runtime (attempts to set TOP will |
| return -ENOTSUP); When alarm support is disabled the driver will |
| not allow set and cancel ALARM operation at runtime (attempts to |
| set and cancel ALARM will return -ENOTSUP). Choose the configuration |
| that matches your application's requirements. |
| |
| config COUNTER_SILABS_TIMER |
| bool "Silicon Labs Series 2 TIMER Counter driver" |
| default y |
| depends on DT_HAS_SILABS_TIMER_COUNTER_ENABLED |
| select SILABS_SISDK_TIMER |
| help |
| Enable the counter driver based on the Silicon Labs |
| TIMER peripheral. |
| This driver supports counter mode with compare-match alarms |
| using TIMER on Silicon Labs Series 2 SoCs. |