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

rtc

Dear experts, please tell me, how can I switch the frequency source for the RTS from STAL to internal RC generator when the processor is running?
command sequence does not work:
NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos) |
(1 << 16) | // Set bit 16 in LFCLKSRC to enable (use with rail-to-rail external source)
(1 << 17); // Set bit 17 in LFCLKSRC to enable use of external source instead of Xtal (SRC needs to be set to Xtal)

NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos) ;

Thanks!

Related