get max clock speed in app and net cores

Hello, 

I'm trying to set the clock speed of the app and net core to the max speed of 128Mhz and 64Mhz accordingly but I couldn't find a clear way to do this. As I understood by default the app and net core are set to 64Mhz . what is the best way to set the max CPU clock speed for both cores in nrf5340? and does it affect the Zephyr sys tick?

what I found so far is this 

nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);
SystemCoreClockUpdate();
thanks in advance!
soc: nrf5340 (nrf5340dk) 
ncs: 2.6.0
  • Hi Mustafa

    Many of the samples will set the clock speed to 128MHz, and you can look at the code snippet here for reference. Essentially all you have to do is call nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1), nothing else is necessary. 

    The network core can only run at 64MHz, no configuration is available. 

    Best regards
    Torbjørn

Related