Skip to content

Commit c6413c3

Browse files
kl-cruzkartben
authored andcommitted
tests: drivers: Turn on HFCLK before LFCLK calibration in nRF devices
This change plays with situation in nRF54L devices where XOTUNE make LF clock calibration process starts a bit longer. Now HF clock is configured to be ready right before LF calibration test. Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
1 parent 9455b41 commit c6413c3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/drivers/clock_control/nrf_clock_calibration/src/test_nrf_clock_calibration.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ static void test_calibration(uint32_t exp_cal, uint32_t exp_skip,
6363
int cal_cnt;
6464
int skip_cnt;
6565

66+
const struct device *const clk_dev = DEVICE_DT_GET_ONE(nordic_nrf_clock);
67+
68+
turn_on_clock(clk_dev, CLOCK_CONTROL_NRF_SUBSYS_HF);
69+
6670
cal_cnt = z_nrf_clock_calibration_count();
6771
skip_cnt = z_nrf_clock_calibration_skips_count();
6872

@@ -71,6 +75,8 @@ static void test_calibration(uint32_t exp_cal, uint32_t exp_skip,
7175
cal_cnt = z_nrf_clock_calibration_count() - cal_cnt;
7276
skip_cnt = z_nrf_clock_calibration_skips_count() - skip_cnt;
7377

78+
turn_off_clock(clk_dev, CLOCK_CONTROL_NRF_SUBSYS_HF);
79+
7480
zassert_equal(cal_cnt, exp_cal,
7581
"%d: Unexpected number of calibrations (%d, exp:%d)",
7682
line, cal_cnt, exp_cal);

0 commit comments

Comments
 (0)