Skip to content

Commit fa93afa

Browse files
[nrf fromlist] tests: drivers: clock_control: nrf: add global hsfll clock
Extend test suite to test global HSFLL clock. Upstream PR #: 81735 Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent ce3f85a commit fa93afa

File tree

1 file changed

+33
-0
lines changed
  • tests/drivers/clock_control/nrf_clock_control/src

1 file changed

+33
-0
lines changed

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,32 @@ static const struct test_clk_context cpurad_hsfll_test_clk_contexts[] = {
104104
};
105105
#endif
106106

107+
const struct nrf_clock_spec test_clk_specs_global_hsfll[] = {
108+
{
109+
.frequency = MHZ(128),
110+
.accuracy = 0,
111+
.precision = NRF_CLOCK_CONTROL_PRECISION_DEFAULT,
112+
},
113+
{
114+
.frequency = MHZ(320),
115+
.accuracy = 0,
116+
.precision = NRF_CLOCK_CONTROL_PRECISION_DEFAULT,
117+
},
118+
{
119+
.frequency = MHZ(64),
120+
.accuracy = 0,
121+
.precision = NRF_CLOCK_CONTROL_PRECISION_DEFAULT,
122+
},
123+
};
124+
125+
static const struct test_clk_context global_hsfll_test_clk_contexts[] = {
126+
{
127+
.clk_dev = DEVICE_DT_GET(DT_NODELABEL(hsfll120)),
128+
.clk_specs = test_clk_specs_global_hsfll,
129+
.clk_specs_size = ARRAY_SIZE(test_clk_specs_global_hsfll),
130+
},
131+
};
132+
107133
const struct nrf_clock_spec test_clk_specs_lfclk[] = {
108134
{
109135
.frequency = 32768,
@@ -249,6 +275,13 @@ ZTEST(nrf2_clock_control, test_lfclk_control)
249275
test_clock_control_request(lfclk_test_clk_contexts, ARRAY_SIZE(lfclk_test_clk_contexts));
250276
}
251277

278+
ZTEST(nrf2_clock_control, test_global_hsfll_control)
279+
{
280+
TC_PRINT("Global HSFLL test\n");
281+
test_clock_control_request(global_hsfll_test_clk_contexts,
282+
ARRAY_SIZE(global_hsfll_test_clk_contexts));
283+
}
284+
252285
ZTEST(nrf2_clock_control, test_safe_request_cancellation)
253286
{
254287
int ret = 0;

0 commit comments

Comments
 (0)