Gerard Marull-Paretas | 24a169e | 2021-11-04 14:14:51 +0100 | [diff] [blame] | 1 | # 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 | |
| 6 | config 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 McCrae | 7924c66 | 2023-04-04 14:35:19 +0100 | [diff] [blame] | 11 | select SYSTEM_TIMER_HAS_DISABLE_SUPPORT |
Krzysztof Chruscinski | e0082ed | 2023-03-22 09:40:20 +0100 | [diff] [blame] | 12 | depends on !$(dt_nodelabel_enabled,rtc1) |
Gerard Marull-Paretas | 24a169e | 2021-11-04 14:14:51 +0100 | [diff] [blame] | 13 | 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 | |
| 18 | if NRF_RTC_TIMER |
| 19 | |
| 20 | config NRF_RTC_TIMER_USER_CHAN_COUNT |
| 21 | int "Additional channels that can be used" |
Alberto Escolar Piedras | 7e852d1 | 2023-10-18 09:04:24 +0200 | [diff] [blame] | 22 | default 2 if NRF_802154_RADIO_DRIVER && SOC_COMPATIBLE_NRF5340_CPUNET |
Adam Zelik | d0bb17a | 2022-08-11 12:34:48 +0200 | [diff] [blame] | 23 | default 3 if NRF_802154_RADIO_DRIVER |
Gerard Marull-Paretas | 24a169e | 2021-11-04 14:14:51 +0100 | [diff] [blame] | 24 | default 0 |
| 25 | help |
| 26 | Use nrf_rtc_timer.h API. Driver is not managing allocation of channels. |
| 27 | |
Vinayak Kariappa Chettimada | 4eb5c37 | 2022-03-03 13:27:39 +0530 | [diff] [blame] | 28 | config NRF_RTC_TIMER_LOCK_ZERO_LATENCY_IRQS |
| 29 | # hidden option |
| 30 | bool |
| 31 | depends on ZERO_LATENCY_IRQS |
Vinayak Kariappa Chettimada | 2214e39 | 2022-03-03 13:27:39 +0530 | [diff] [blame] | 32 | default y if !BT_LL_SW_SPLIT |
Vinayak Kariappa Chettimada | 4eb5c37 | 2022-03-03 13:27:39 +0530 | [diff] [blame] | 33 | 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 Chruscinski | 336c1ad | 2022-11-16 13:04:22 +0100 | [diff] [blame] | 39 | config 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-Paretas | 24a169e | 2021-11-04 14:14:51 +0100 | [diff] [blame] | 45 | endif # NRF_RTC_TIMER |