Skip to content

Commit

Permalink
Merge pull request #15 from tobigun/do-not-set-lfclksrc
Browse files Browse the repository at this point in the history
Do not set LFCLKSRC as it will hang if no external crystal is present
  • Loading branch information
TMRh20 authored Mar 11, 2024
2 parents 924dff5 + 978548e commit f5b3fe8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nrf_to_nrf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ bool nrf_to_nrf::begin()
// Do nothing.
}

NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos);
NRF_CLOCK->EVENTS_LFCLKSTARTED = 0;
NRF_CLOCK->TASKS_LFCLKSTART = 1;

/* Wait for the low frequency clock to start up */
while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) {
// Do nothing.
}
Expand Down

0 comments on commit f5b3fe8

Please sign in to comment.