1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-31 17:31:18 +01:00

Merge pull request #20669 from mguetschow/nrf52-lfclk_rc-calibrate

cpu/nrf5x_common: properly calibrate RC-based low-frequency clock
This commit is contained in:
Marian Buschsieweke 2024-05-14 15:41:19 +00:00 committed by GitHub
commit 28beaddfc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -103,10 +103,12 @@ void clock_start_lf(void)
clock_lf_running = true;
/* calibrate the RC LF clock if applicable */
#if (CLOCK_HFCLK && (CLOCK_LFCLK == 0))
#if (CLOCK_LFCLK == CLOCK_LFCLKSRC_SRC_RC)
clock_hfxo_request();
NRF_CLOCK->EVENTS_DONE = 0;
NRF_CLOCK->TASKS_CAL = 1;
while (NRF_CLOCK->EVENTS_DONE == 0) {}
clock_hfxo_release();
#endif
}