1# Copyright (c) 2019 Nordic Semiconductor ASA
2# SPDX-License-Identifier: Apache-2.0
3
4config NRF53_SYNC_RTC
5	bool "RTC clock synchronization"
6	default y if LOG && !LOG_MODE_MINIMAL && !IS_BOOTLOADER && \
7		(SOC_NRF53_CPUNET_ENABLE || SOC_NRF5340_CPUNET)
8	depends on NRF_RTC_TIMER
9	select NRFX_GPPI
10	select MBOX if !IPM
11
12if NRF53_SYNC_RTC
13
14module = SYNC_RTC
15module-str = Synchronized RTC
16source "subsys/logging/Kconfig.template.log_config"
17
18config NRF53_SYNC_RTC_INIT_PRIORITY
19	int "nRF53 Synchronized RTC init priority"
20	default APPLICATION_INIT_PRIORITY
21	help
22	  nRF53 Synchronized RTC initialization priority.
23
24config NRF_RTC_TIMER_USER_CHAN_COUNT
25	default 2 if NRF_802154_RADIO_DRIVER && SOC_COMPATIBLE_NRF5340_CPUNET
26	default 3 if NRF_802154_RADIO_DRIVER
27	default 1
28
29config NRF53_SYNC_RTC_LOG_TIMESTAMP
30	bool "Use Synchronized RTC for logging timestamp"
31	default y
32
33config NRF53_SYNC_RTC_IPM_OUT
34	int "IPM channel from APP to NET"
35	range 0 15
36	default 7 if SOC_COMPATIBLE_NRF5340_CPUAPP
37	default 8
38
39config NRF53_SYNC_RTC_IPM_IN
40	int "IPM channel from APP to NET"
41	range 0 15
42	default 8 if SOC_COMPATIBLE_NRF5340_CPUAPP
43	default 7
44
45ipm_num = 0
46rsource "Kconfig.sync_rtc_ipm"
47ipm_num = 1
48rsource "Kconfig.sync_rtc_ipm"
49ipm_num = 2
50rsource "Kconfig.sync_rtc_ipm"
51ipm_num = 3
52rsource "Kconfig.sync_rtc_ipm"
53ipm_num = 4
54rsource "Kconfig.sync_rtc_ipm"
55ipm_num = 5
56rsource "Kconfig.sync_rtc_ipm"
57ipm_num = 6
58rsource "Kconfig.sync_rtc_ipm"
59ipm_num = 7
60rsource "Kconfig.sync_rtc_ipm"
61ipm_num = 8
62rsource "Kconfig.sync_rtc_ipm"
63ipm_num = 9
64rsource "Kconfig.sync_rtc_ipm"
65ipm_num = 10
66rsource "Kconfig.sync_rtc_ipm"
67ipm_num = 11
68rsource "Kconfig.sync_rtc_ipm"
69ipm_num = 12
70rsource "Kconfig.sync_rtc_ipm"
71ipm_num = 13
72rsource "Kconfig.sync_rtc_ipm"
73ipm_num = 14
74rsource "Kconfig.sync_rtc_ipm"
75ipm_num = 15
76rsource "Kconfig.sync_rtc_ipm"
77
78endif # NRF53_SYNC_RTC
79