This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Changing the oscillator

I would like to change the HFCLK from an internal to an external oscillator.
How can I do this in the software?

■Environment
  nRF52810
  s112

Parents Reply Children
  • Hi, 

    I think that the hfclk functions you mention can be used  if the soft device is already enabled

    because if  I perform  sd_clock_hfclk_request() without  nrf_sdh_enable_request() first,

    debugger throws:  ERROR 2 [NRF_ERROR_SOFTDEVICE_NOT_ENABLED]


       //APP_ERROR_CHECK(nrf_sdh_enable_request());
       APP_ERROR_CHECK(sd_clock_hfclk_request());
       APP_ERROR_CHECK(sd_clock_hfclk_is_running(&p_k));
       NRF_LOG_INFO(" *p_k = %d", *p_k);
       if(*p_k == 1) 
       { NRF_LOG_INFO("Crystal Running"); }
       else 
       { NRF_LOG_INFO("Crystal not Running. Return Value %d", *p_k);}

    Is this correct?

Related