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
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
Hi,
You can request the external crystal oscillator by using function sd_clock_hfclk_request(). You can check if the external crystal is running using sd_clock_hfclk_is_running().
Best regards,
Marjeris
Hi,
You can request the external crystal oscillator by using function sd_clock_hfclk_request(). You can check if the external crystal is running using sd_clock_hfclk_is_running().
Best regards,
Marjeris
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?