nrf5340 processor scaling

Hi,

We are using nrf5340 and nrf connect SDK V2.0.0

Using below code, we are able to scale up/down the processor frequency.

	printk("CPU clock during booting: %u MHz\n", SystemCoreClock/MHZ(1));
	printk("NRF_CLOCK_S.HFCLKCTRL:%d\n",NRF_CLOCK_S->HFCLKCTRL);
	
	printk("Switching application core from 64 MHz and 128 MHz. \n");
	nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);
	printk("NRF_CLOCK_S.HFCLKCTRL:%d\n",NRF_CLOCK_S->HFCLKCTRL);

	printk("Switching application core from 128 MHz and 64 MHz. \n");
	nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_2);
	printk("NRF_CLOCK_S.HFCLKCTRL:%d\n",NRF_CLOCK_S->HFCLKCTRL);

However, in our application we want to use the processor at frequencies based on our needs (Ex. 48, 64, 96, 128 MHz).

So, please let me, how can we do that?

Thanks

Related