blob: 729dc8d362a7e6a045175a6239622b7193036072 [file] [log] [blame]
Gerard Marull-Paretas24a169e2021-11-04 14:14:51 +01001# Copyright (c) 2014-2015 Wind River Systems, Inc.
2# Copyright (c) 2016 Cadence Design Systems, Inc.
3# Copyright (c) 2019 Intel Corp.
4# SPDX-License-Identifier: Apache-2.0
5
6config NRF_RTC_TIMER
7 bool "nRF Real Time Counter (NRF_RTC1) Timer"
8 depends on CLOCK_CONTROL
9 depends on SOC_COMPATIBLE_NRF
10 select TICKLESS_CAPABLE
Jamie McCrae7924c662023-04-04 14:35:19 +010011 select SYSTEM_TIMER_HAS_DISABLE_SUPPORT
Krzysztof Chruscinskie0082ed2023-03-22 09:40:20 +010012 depends on !$(dt_nodelabel_enabled,rtc1)
Gerard Marull-Paretas24a169e2021-11-04 14:14:51 +010013 help
14 This module implements a kernel device driver for the nRF Real Time
15 Counter NRF_RTC1 and provides the standard "system clock driver"
16 interfaces.
17
18if NRF_RTC_TIMER
19
20config NRF_RTC_TIMER_USER_CHAN_COUNT
21 int "Additional channels that can be used"
Alberto Escolar Piedras7e852d12023-10-18 09:04:24 +020022 default 2 if NRF_802154_RADIO_DRIVER && SOC_COMPATIBLE_NRF5340_CPUNET
Adam Zelikd0bb17a2022-08-11 12:34:48 +020023 default 3 if NRF_802154_RADIO_DRIVER
Gerard Marull-Paretas24a169e2021-11-04 14:14:51 +010024 default 0
25 help
26 Use nrf_rtc_timer.h API. Driver is not managing allocation of channels.
27
Vinayak Kariappa Chettimada4eb5c372022-03-03 13:27:39 +053028config NRF_RTC_TIMER_LOCK_ZERO_LATENCY_IRQS
29 # hidden option
30 bool
31 depends on ZERO_LATENCY_IRQS
Vinayak Kariappa Chettimada2214e392022-03-03 13:27:39 +053032 default y if !BT_LL_SW_SPLIT
Vinayak Kariappa Chettimada4eb5c372022-03-03 13:27:39 +053033 help
34 Enable use of __disable_irq() to disable Zero Latency IRQs to prevent
35 higher priority contexts (including ZLIs) that might preempt the
36 handler and call nrf_rtc_timer API from destroying the internal state
37 in nrf_rtc_timer.
38
Krzysztof Chruscinski336c1ad2022-11-16 13:04:22 +010039config NRF_RTC_TIMER_TRIGGER_OVERFLOW
40 bool "Trigger overflow"
41 help
42 When enabled, a function can be used to trigger RTC overflow and
43 effectively shift time into the future.
44
Gerard Marull-Paretas24a169e2021-11-04 14:14:51 +010045endif # NRF_RTC_TIMER