@@ -138,6 +138,22 @@ static const struct test_clk_ctx lfclk_test_clk_ctx[] = {
138
138
};
139
139
140
140
#if defined(CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP )
141
+ const struct nrf_clock_spec test_clk_specs_auxpll [] = {
142
+ {
143
+ .frequency = MHZ (80 ),
144
+ .accuracy = 0 ,
145
+ .precision = NRF_CLOCK_CONTROL_PRECISION_DEFAULT ,
146
+ },
147
+ };
148
+
149
+ static const struct test_clk_ctx auxpll_test_clk_ctx [] = {
150
+ {
151
+ .clk_dev = DEVICE_DT_GET (DT_NODELABEL (canpll )),
152
+ .clk_specs = test_clk_specs_auxpll ,
153
+ .clk_specs_size = ARRAY_SIZE (test_clk_specs_auxpll ),
154
+ },
155
+ };
156
+
141
157
const struct nrf_clock_spec test_clk_specs_hfxo [] = {
142
158
{
143
159
.frequency = MHZ (32 ),
@@ -209,31 +225,11 @@ static void test_clock_control_request(const struct test_clk_ctx *clk_contexts,
209
225
k_busy_wait (REQUEST_SERVING_WAIT_TIME_US );
210
226
}
211
227
212
- #if defined(CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP )
213
- static void test_auxpll_control (const struct device * clk_dev )
214
- {
215
- int err ;
216
- enum clock_control_status clk_status ;
217
-
218
- err = clock_control_on (clk_dev , NULL );
219
- LOG_INF ("Auxpll: %s ON request, status: %d" , clk_dev -> name , err );
220
- k_msleep (10 );
221
- clk_status = clock_control_get_status (clk_dev , NULL );
222
- __ASSERT_NO_MSG (clk_status == CLOCK_CONTROL_STATUS_ON );
223
- err = clock_control_off (clk_dev , NULL );
224
- LOG_INF ("Auxpll: %s OFF request, status: %d" , clk_dev -> name , err );
225
- k_msleep (10 );
226
- clk_status = clock_control_get_status (clk_dev , NULL );
227
- __ASSERT_NO_MSG (clk_status == CLOCK_CONTROL_STATUS_OFF );
228
- k_busy_wait (REQUEST_SERVING_WAIT_TIME_US );
229
- }
230
- #endif /* CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP */
231
-
232
228
void run_tests (void )
233
229
{
234
230
gpio_pin_set_dt (& led , 1 );
235
231
#if defined(CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP )
236
- test_auxpll_control ( DEVICE_DT_GET ( DT_NODELABEL ( canpll ) ));
232
+ test_clock_control_request ( auxpll_test_clk_ctx , ARRAY_SIZE ( auxpll_test_clk_ctx ));
237
233
test_clock_control_request (hfxo_test_clk_ctx , ARRAY_SIZE (hfxo_test_clk_ctx ));
238
234
test_clock_control_request (hsfll_test_clk_ctx , ARRAY_SIZE (hsfll_test_clk_ctx ));
239
235
#endif /* CONFIG_BOARD_NRF54H20DK_NRF54H20_CPUAPP */
0 commit comments