1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 05:53:49 +01:00

Merge pull request #13411 from benpicco/samd5x-OSCCTRL.ONDEMAND

cpu/samd5x: use ONDEMAND bit to run clocks on demand
This commit is contained in:
Dylan Laduranty 2020-02-21 23:37:07 +01:00 committed by GitHub
commit e74484c31f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,4 +203,9 @@ void cpu_init(void)
/* trigger static peripheral initialization */
periph_init();
/* set ONDEMAND bit after all clocks have been configured */
/* This is to avoid setting the source for the main clock to ONDEMAND before using it. */
OSCCTRL->DFLLCTRLA.reg |= OSCCTRL_DFLLCTRLA_ONDEMAND;
OSCCTRL->Dpll[0].DPLLCTRLA.reg |= OSCCTRL_DPLLCTRLA_ONDEMAND;
}