cpu/samd5x: don't run DFLL on-demand
The DFLL on samd5x has a hardware bug that requires a special re-enabling sequence when it is disabled and then re-enabled again. When running the clock on-demand, the hardware handles the disabling and re-enabling so that sequence does not get executed. To reproduce, run `tests/periph_uart` on `same54-xpro`. Without this patch the test will get seemingly stuck on `sleep_test()`. (In fact it keeps running, but the DFLL has the wrong frequency so the UART baudrate is wrong). In this test, on `same54-xpro` only UART0 is sourced from DFLL. So if the UART is disabled the DFLL will be turned off as well.
This commit is contained in:
parent
4eb9b9b9df
commit
49fda3e900
@ -235,6 +235,5 @@ void cpu_init(void)
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user