Skip to content

Commit fea1633

Browse files
committed
[nrf fromlist] treewide: Replace single clock api with separated clock api.
Replaced clock_control_nrf, nrfx_clock api usecases with clock speciffic api. Upstream PR #: 99290 Signed-off-by: Michal Frankiewicz <michal.frankiewicz@nordicsemi.no>
1 parent 2d95f81 commit fea1633

File tree

11 files changed

+111
-869
lines changed

11 files changed

+111
-869
lines changed

drivers/clock_control/clock_control_nrf.c

Lines changed: 0 additions & 778 deletions
This file was deleted.

drivers/clock_control/clock_control_nrf_common.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#include "clock_control_nrf_common.h"
77
#include <nrfx.h>
8-
#include <nrfx_clock.h>
98

109
#if NRFX_CHECK(NRFX_POWER_ENABLED)
1110
#include <nrfx_power.h>
@@ -24,9 +23,6 @@ static void clock_irq_handler(void)
2423
STRUCT_SECTION_FOREACH(clock_control_nrf_irq_handler, irq) {
2524
irq->handler();
2625
}
27-
28-
/* temporary fix, it will be removed when all the clocks are moved to their files */
29-
nrfx_clock_irq_handler();
3026
}
3127

3228
void clock_control_nrf_common_connect_irq(void)

drivers/clock_control/nrf_clock_calibration.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <zephyr/drivers/clock_control.h>
88
#include "nrf_clock_calibration.h"
99
#include <zephyr/drivers/clock_control/nrf_clock_control.h>
10-
#include <nrfx_clock.h>
10+
#include <nrfx_clock_lfclk.h>
1111
#include <zephyr/logging/log.h>
1212
#include <stdlib.h>
1313

@@ -119,7 +119,7 @@ static void cal_lf_callback(struct onoff_manager *mgr,
119119
/* Start actual HW calibration assuming that HFCLK XTAL is on. */
120120
static void start_hw_cal(void)
121121
{
122-
nrfx_clock_calibration_start();
122+
nrfx_clock_lfclk_calibration_start();
123123
calib_skip_cnt = CONFIG_CLOCK_CONTROL_NRF_CALIBRATION_MAX_SKIP;
124124
}
125125

modules/hal_nordic/nrfx/CMakeLists.txt

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -137,48 +137,48 @@ endif()
137137

138138
zephyr_library_sources_ifdef(CONFIG_NRFX_PRS ${SRC_DIR}/prs/nrfx_prs.c)
139139

140-
zephyr_library_sources_ifdef(CONFIG_NRFX_ADC ${SRC_DIR}/nrfx_adc.c)
140+
zephyr_library_sources_ifdef(CONFIG_NRFX_ADC ${SRC_DIR}/nrfx_adc.c)
141141
zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock.c)
142-
zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock_hfclk.c)
143-
zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock_hfclkaudio.c)
144-
zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock_hfclk192m.c)
145-
zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock_lfclk.c)
146-
zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock_xo.c)
147-
zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock_xo24m.c)
148-
zephyr_library_sources_ifdef(CONFIG_NRFX_COMP ${SRC_DIR}/nrfx_comp.c)
149-
zephyr_library_sources_ifdef(CONFIG_NRFX_CRACEN ${SRC_DIR}/nrfx_cracen.c)
150-
zephyr_library_sources_ifdef(CONFIG_NRFX_EGU ${SRC_DIR}/nrfx_egu.c)
151-
zephyr_library_sources_ifdef(CONFIG_NRFX_GPIOTE ${SRC_DIR}/nrfx_gpiote.c)
152-
zephyr_library_sources_ifdef(CONFIG_NRFX_GRTC ${SRC_DIR}/nrfx_grtc.c)
153-
zephyr_library_sources_ifdef(CONFIG_NRFX_I2S ${SRC_DIR}/nrfx_i2s.c)
154-
zephyr_library_sources_ifdef(CONFIG_NRFX_IPC ${SRC_DIR}/nrfx_ipc.c)
155-
zephyr_library_sources_ifdef(CONFIG_NRFX_LPCOMP ${SRC_DIR}/nrfx_lpcomp.c)
156-
zephyr_library_sources_ifdef(CONFIG_NRFX_MRAMC ${SRC_DIR}/nrfx_mramc.c)
157-
zephyr_library_sources_ifdef(CONFIG_NRFX_NFCT ${SRC_DIR}/nrfx_nfct.c)
158-
zephyr_library_sources_ifdef(CONFIG_NRFX_NVMC ${SRC_DIR}/nrfx_nvmc.c)
159-
zephyr_library_sources_ifdef(CONFIG_NRFX_PDM ${SRC_DIR}/nrfx_pdm.c)
160-
zephyr_library_sources_ifdef(CONFIG_NRFX_POWER ${SRC_DIR}/nrfx_power.c)
161-
zephyr_library_sources_ifdef(CONFIG_NRFX_PWM ${SRC_DIR}/nrfx_pwm.c)
162-
zephyr_library_sources_ifdef(CONFIG_NRFX_QDEC ${SRC_DIR}/nrfx_qdec.c)
163-
zephyr_library_sources_ifdef(CONFIG_NRFX_QSPI ${SRC_DIR}/nrfx_qspi.c)
164-
zephyr_library_sources_ifdef(CONFIG_NRFX_RNG ${SRC_DIR}/nrfx_rng.c)
165-
zephyr_library_sources_ifdef(CONFIG_NRFX_RRAMC ${SRC_DIR}/nrfx_rramc.c)
166-
zephyr_library_sources_ifdef(CONFIG_NRFX_RTC ${SRC_DIR}/nrfx_rtc.c)
167-
zephyr_library_sources_ifdef(CONFIG_NRFX_SAADC ${SRC_DIR}/nrfx_saadc.c)
168-
zephyr_library_sources_ifdef(CONFIG_NRFX_SPI ${SRC_DIR}/nrfx_spi.c)
169-
zephyr_library_sources_ifdef(CONFIG_NRFX_SPIM ${SRC_DIR}/nrfx_spim.c)
170-
zephyr_library_sources_ifdef(CONFIG_NRFX_SPIS ${SRC_DIR}/nrfx_spis.c)
171-
zephyr_library_sources_ifdef(CONFIG_NRFX_SYSTICK ${SRC_DIR}/nrfx_systick.c)
172-
zephyr_library_sources_ifdef(CONFIG_NRFX_TBM ${SRC_DIR}/nrfx_tbm.c)
173-
zephyr_library_sources_ifdef(CONFIG_NRFX_TEMP ${SRC_DIR}/nrfx_temp.c)
174-
zephyr_library_sources_ifdef(CONFIG_NRFX_TIMER ${SRC_DIR}/nrfx_timer.c)
175-
zephyr_library_sources_ifdef(CONFIG_NRFX_TWI ${SRC_DIR}/nrfx_twi.c)
176-
zephyr_library_sources_ifdef(CONFIG_NRFX_TWIM ${SRC_DIR}/nrfx_twim.c)
177-
zephyr_library_sources_ifdef(CONFIG_NRFX_TWIS ${SRC_DIR}/nrfx_twis.c)
178-
zephyr_library_sources_ifdef(CONFIG_NRFX_UART ${SRC_DIR}/nrfx_uart.c)
179-
zephyr_library_sources_ifdef(CONFIG_NRFX_UARTE ${SRC_DIR}/nrfx_uarte.c)
180-
zephyr_library_sources_ifdef(CONFIG_NRFX_USBREG ${SRC_DIR}/nrfx_usbreg.c)
181-
zephyr_library_sources_ifdef(CONFIG_NRFX_WDT ${SRC_DIR}/nrfx_wdt.c)
142+
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_NRF_HFCLK ${SRC_DIR}/nrfx_clock_hfclk.c)
143+
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_NRF_HFCLKAUDIO ${SRC_DIR}/nrfx_clock_hfclkaudio.c)
144+
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_NRF_HFCLK192M ${SRC_DIR}/nrfx_clock_hfclk192m.c)
145+
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_NRF_LFCLK ${SRC_DIR}/nrfx_clock_lfclk.c)
146+
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_NRF_XO ${SRC_DIR}/nrfx_clock_xo.c)
147+
zephyr_library_sources_ifdef(CONFIG_CLOCK_CONTROL_NRF_XO24M ${SRC_DIR}/nrfx_clock_xo24m.c)
148+
zephyr_library_sources_ifdef(CONFIG_NRFX_COMP ${SRC_DIR}/nrfx_comp.c)
149+
zephyr_library_sources_ifdef(CONFIG_NRFX_CRACEN ${SRC_DIR}/nrfx_cracen.c)
150+
zephyr_library_sources_ifdef(CONFIG_NRFX_EGU ${SRC_DIR}/nrfx_egu.c)
151+
zephyr_library_sources_ifdef(CONFIG_NRFX_GPIOTE ${SRC_DIR}/nrfx_gpiote.c)
152+
zephyr_library_sources_ifdef(CONFIG_NRFX_GRTC ${SRC_DIR}/nrfx_grtc.c)
153+
zephyr_library_sources_ifdef(CONFIG_NRFX_I2S ${SRC_DIR}/nrfx_i2s.c)
154+
zephyr_library_sources_ifdef(CONFIG_NRFX_IPC ${SRC_DIR}/nrfx_ipc.c)
155+
zephyr_library_sources_ifdef(CONFIG_NRFX_LPCOMP ${SRC_DIR}/nrfx_lpcomp.c)
156+
zephyr_library_sources_ifdef(CONFIG_NRFX_MRAMC ${SRC_DIR}/nrfx_mramc.c)
157+
zephyr_library_sources_ifdef(CONFIG_NRFX_NFCT ${SRC_DIR}/nrfx_nfct.c)
158+
zephyr_library_sources_ifdef(CONFIG_NRFX_NVMC ${SRC_DIR}/nrfx_nvmc.c)
159+
zephyr_library_sources_ifdef(CONFIG_NRFX_PDM ${SRC_DIR}/nrfx_pdm.c)
160+
zephyr_library_sources_ifdef(CONFIG_NRFX_POWER ${SRC_DIR}/nrfx_power.c)
161+
zephyr_library_sources_ifdef(CONFIG_NRFX_PWM ${SRC_DIR}/nrfx_pwm.c)
162+
zephyr_library_sources_ifdef(CONFIG_NRFX_QDEC ${SRC_DIR}/nrfx_qdec.c)
163+
zephyr_library_sources_ifdef(CONFIG_NRFX_QSPI ${SRC_DIR}/nrfx_qspi.c)
164+
zephyr_library_sources_ifdef(CONFIG_NRFX_RNG ${SRC_DIR}/nrfx_rng.c)
165+
zephyr_library_sources_ifdef(CONFIG_NRFX_RRAMC ${SRC_DIR}/nrfx_rramc.c)
166+
zephyr_library_sources_ifdef(CONFIG_NRFX_RTC ${SRC_DIR}/nrfx_rtc.c)
167+
zephyr_library_sources_ifdef(CONFIG_NRFX_SAADC ${SRC_DIR}/nrfx_saadc.c)
168+
zephyr_library_sources_ifdef(CONFIG_NRFX_SPI ${SRC_DIR}/nrfx_spi.c)
169+
zephyr_library_sources_ifdef(CONFIG_NRFX_SPIM ${SRC_DIR}/nrfx_spim.c)
170+
zephyr_library_sources_ifdef(CONFIG_NRFX_SPIS ${SRC_DIR}/nrfx_spis.c)
171+
zephyr_library_sources_ifdef(CONFIG_NRFX_SYSTICK ${SRC_DIR}/nrfx_systick.c)
172+
zephyr_library_sources_ifdef(CONFIG_NRFX_TBM ${SRC_DIR}/nrfx_tbm.c)
173+
zephyr_library_sources_ifdef(CONFIG_NRFX_TEMP ${SRC_DIR}/nrfx_temp.c)
174+
zephyr_library_sources_ifdef(CONFIG_NRFX_TIMER ${SRC_DIR}/nrfx_timer.c)
175+
zephyr_library_sources_ifdef(CONFIG_NRFX_TWI ${SRC_DIR}/nrfx_twi.c)
176+
zephyr_library_sources_ifdef(CONFIG_NRFX_TWIM ${SRC_DIR}/nrfx_twim.c)
177+
zephyr_library_sources_ifdef(CONFIG_NRFX_TWIS ${SRC_DIR}/nrfx_twis.c)
178+
zephyr_library_sources_ifdef(CONFIG_NRFX_UART ${SRC_DIR}/nrfx_uart.c)
179+
zephyr_library_sources_ifdef(CONFIG_NRFX_UARTE ${SRC_DIR}/nrfx_uarte.c)
180+
zephyr_library_sources_ifdef(CONFIG_NRFX_USBREG ${SRC_DIR}/nrfx_usbreg.c)
181+
zephyr_library_sources_ifdef(CONFIG_NRFX_WDT ${SRC_DIR}/nrfx_wdt.c)
182182

183183
if(CONFIG_NRFX_TWI OR CONFIG_NRFX_TWIM)
184184
zephyr_library_sources(${SRC_DIR}/nrfx_twi_twim.c)

samples/boards/nordic/clock_skew/src/main.c

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,19 @@
1010
#include <zephyr/drivers/clock_control.h>
1111
#include <zephyr/drivers/clock_control/nrf_clock_control.h>
1212
#include <zephyr/drivers/counter.h>
13-
#include <nrfx_clock.h>
13+
#include <hal/nrf_clock.h>
14+
#include <nrfx_clock_lfclk.h>
15+
16+
#if NRF_CLOCK_HAS_HFCLK
17+
#include <nrfx_clock_hfclk.h>
18+
#elif NRF_CLOCK_HAS_XO
19+
#include <nrfx_clock_xo.h>
20+
#else
21+
#error "HF clock not enabled"
22+
#endif
1423

1524
#define UPDATE_INTERVAL_S 10
1625

17-
static const struct device *const clock0 = DEVICE_DT_GET_ONE(nordic_nrf_clock);
1826
static const struct device *const timer0 = DEVICE_DT_GET(DT_NODELABEL(timer0));
1927
static struct timeutil_sync_config sync_config;
2028
static uint64_t counter_ref;
@@ -100,14 +108,18 @@ static void show_clocks(const char *tag)
100108
enum clock_control_status clkstat;
101109
bool running;
102110

103-
clkstat = clock_control_get_status(clock0, CLOCK_CONTROL_NRF_SUBSYS_LF);
104-
running = nrf_clock_is_running(NRF_CLOCK, NRF_CLOCK_DOMAIN_LFCLK,
105-
&src.lf);
111+
clkstat = clock_control_get_status(DEVICE_DT_GET_ONE(nordic_nrf_clock_lfclk), NULL);
112+
running = nrfx_clock_lfclk_running_check(&src.lf);
106113
printk("%s: LFCLK[%s]: %s %s ; ", tag, clkstat_s[clkstat],
107114
running ? "Running" : "Off", lfsrc_s[src.lf]);
108-
clkstat = clock_control_get_status(clock0, CLOCK_CONTROL_NRF_SUBSYS_HF);
109-
running = nrf_clock_is_running(NRF_CLOCK, NRF_CLOCK_DOMAIN_HFCLK,
110-
&src.hf);
115+
clkstat = clock_control_get_status(DEVICE_DT_GET_ONE(COND_CODE_1((NRF_CLOCK_HAS_HFCLK),
116+
(nordic_nrf_clock_hfclk),
117+
(nordic_nrf_clock_xo))),
118+
NULL);
119+
120+
running = COND_CODE_1((NRF_CLOCK_HAS_HFCLK),
121+
(nrfx_clock_hfclk_running_check),
122+
(nrfx_clock_xo_running_check))(&src.hf);
111123
printk("HFCLK[%s]: %s %s\n", clkstat_s[clkstat],
112124
running ? "Running" : "Off", hfsrc_s[src.hf]);
113125
}
@@ -196,19 +208,22 @@ static void sync_work_handler(struct k_work *work)
196208

197209
int main(void)
198210
{
211+
struct device *clk_dev = DEVICE_DT_GET_ONE(COND_CODE_1((NRF_CLOCK_HAS_HFCLK),
212+
(nordic_nrf_clock_hfclk),
213+
(nordic_nrf_clock_xo)));
199214
uint32_t top;
200215
int rc;
201216

202217
/* Grab the clock driver */
203-
if (!device_is_ready(clock0)) {
204-
printk("%s: device not ready.\n", clock0->name);
218+
if (!device_is_ready(clk_dev)) {
219+
printk("%s: device not ready.\n", clk_dev->name);
205220
return 0;
206221
}
207222

208223
show_clocks("Power-up clocks");
209224

210225
if (IS_ENABLED(CONFIG_APP_ENABLE_HFXO)) {
211-
rc = clock_control_on(clock0, CLOCK_CONTROL_NRF_SUBSYS_HF);
226+
rc = clock_control_on(clk_dev, NULL);
212227
printk("Enable HFXO got %d\n", rc);
213228
}
214229

samples/net/zperf/src/nrf5340_cpu_boost.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <zephyr/kernel.h>
1313
#include <zephyr/logging/log.h>
1414

15-
#include <nrfx_clock.h>
15+
#include <nrfx_clock_hfclk.h>
1616

1717
LOG_MODULE_DECLARE(zperf, CONFIG_NET_ZPERF_LOG_LEVEL);
1818

@@ -21,7 +21,7 @@ static int nrf53_cpu_boost(void)
2121
int err;
2222

2323
/* For optimal performance, the CPU frequency should be set to 128 MHz */
24-
err = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);
24+
err = nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1);
2525
if (err != 0) {
2626
LOG_WRN("Failed to set 128 MHz: %d", err);
2727
}

subsys/bluetooth/audio/shell/bap_usb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <zephyr/usb/usbd.h>
3737

3838
#if defined(CONFIG_SOC_NRF5340_CPUAPP)
39-
#include <nrfx_clock.h>
39+
#include <nrfx_clock_hfclk.h>
4040
#include <drivers/nrfx_errors.h>
4141
#include <hal/nrf_clock.h>
4242
#endif /* CONFIG_SOC_NRF5340_CPUAPP */
@@ -736,7 +736,7 @@ int bap_usb_init(void)
736736
* This may not be required, but reduces the risk of not decoding fast enough
737737
* to keep up with USB
738738
*/
739-
err = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);
739+
err = nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1);
740740

741741
if (err != 0) {
742742
LOG_WRN("Failed to set 128 MHz: %d", err);

tests/drivers/clock_control/clock_control_api/src/nrf_device_subsys.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@
1010
#if NRF_CLOCK_HAS_HFCLK
1111
static const struct device_subsys_data subsys_data_hfclk[] = {
1212
{
13-
.subsys = CLOCK_CONTROL_NRF_SUBSYS_HF,
13+
.subsys = NULL,
1414
.startup_us = CONFIG_TEST_NRF_HF_STARTUP_TIME_US
1515
}
1616
};
1717
#endif /* NRF_CLOCK_HAS_HFCLK */
1818
#if NRF_CLOCK_HAS_XO
1919
static const struct device_subsys_data subsys_data_xo[] = {
2020
{
21-
.subsys = CLOCK_CONTROL_NRF_SUBSYS_HF,
21+
.subsys = NULL,
2222
.startup_us = CONFIG_TEST_NRF_HF_STARTUP_TIME_US
2323
}
2424
};
2525
#endif /* NRF_CLOCK_HAS_XO */
2626
#if !defined(CONFIG_SOC_NRF52832)
2727
static const struct device_subsys_data subsys_data_lfclk[] = {
2828
{
29-
.subsys = CLOCK_CONTROL_NRF_SUBSYS_LF,
29+
.subsys = NULL,
3030
.startup_us = (CLOCK_CONTROL_NRF_K32SRC ==
3131
NRF_CLOCK_LFCLK_RC) ? 1000 : 500000
3232
}
@@ -35,23 +35,23 @@ static const struct device_subsys_data subsys_data_lfclk[] = {
3535
#if NRF_CLOCK_HAS_HFCLK192M
3636
static const struct device_subsys_data subsys_data_hfclk192m[] = {
3737
{
38-
.subsys = CLOCK_CONTROL_NRF_SUBSYS_HF192M,
38+
.subsys = NULL,
3939
.startup_us = 5
4040
}
4141
};
4242
#endif /* NRF_CLOCK_HAS_HFCLK192M */
4343
#if NRF_CLOCK_HAS_HFCLKAUDIO
4444
static const struct device_subsys_data subsys_data_hfclkaudio[] = {
4545
{
46-
.subsys = CLOCK_CONTROL_NRF_SUBSYS_HFAUDIO,
46+
.subsys = NULL,
4747
.startup_us = 30
4848
}
4949
};
5050
#endif /* NRF_CLOCK_HAS_HFCLKAUDIO */
5151
#if NRF_CLOCK_HAS_XO24M
5252
static const struct device_subsys_data subsys_data_xo24m[] = {
5353
{
54-
.subsys = CLOCK_CONTROL_NRF_SUBSYS_HF24M,
54+
.subsys = NULL,
5555
.startup_us = 5
5656
}
5757
};

tests/drivers/clock_control/nrf_lf_clock_start/src/main.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
#include <zephyr/ztest.h>
77
#include <hal/nrf_clock.h>
8+
#include <nrfx_clock_lfclk.h>
89
#include <zephyr/drivers/clock_control/nrf_clock_control.h>
910

1011
static nrf_clock_lfclk_t clk_type;
@@ -74,13 +75,13 @@ ZTEST(nrf_lf_clock_start, test_wait_in_thread)
7475
}
7576

7677
z_nrf_clock_control_lf_on(CLOCK_CONTROL_NRF_LF_START_AVAILABLE);
77-
o = nrf_clock_is_running(NRF_CLOCK, NRF_CLOCK_DOMAIN_LFCLK, &t);
78+
o = nrfx_clock_lfclk_running_check(&t);
7879
zassert_false((t == NRF_CLOCK_LFCLK_XTAL) && o);
7980
k_busy_wait(35);
8081
zassert_true(k_cycle_get_32() > 0);
8182

8283
z_nrf_clock_control_lf_on(CLOCK_CONTROL_NRF_LF_START_STABLE);
83-
o = nrf_clock_is_running(NRF_CLOCK, NRF_CLOCK_DOMAIN_LFCLK, &t);
84+
o = nrfx_clock_lfclk_running_check(&t);
8485
zassert_true((t == NRF_CLOCK_LFCLK_XTAL) && o);
8586
}
8687

@@ -118,7 +119,7 @@ static int get_lfclk_state(void)
118119
* not valid, in that case read system clock to check if it has
119120
* progressed.
120121
*/
121-
clk_on = nrf_clock_is_running(NRF_CLOCK, NRF_CLOCK_DOMAIN_LFCLK, &clk_type);
122+
clk_on = nrfx_clock_lfclk_running_check(&clk_type);
122123
k_busy_wait(100);
123124
rtc_cnt = k_cycle_get_32();
124125

0 commit comments

Comments
 (0)