mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-05-06 21:26:54 +00:00
Move update_peripheral_clocks
Incorrect order of operations would hang execution if switching to IRC.
This commit is contained in:
parent
c025a2bba2
commit
bfc73a6675
@ -382,14 +382,14 @@ void ClockManager::change_clock_configuration(const cgu::CLK_SEL clk_sel) {
|
|||||||
|
|
||||||
set_m4_clock_to_irc();
|
set_m4_clock_to_irc();
|
||||||
|
|
||||||
|
update_peripheral_clocks(clk_sel);
|
||||||
|
|
||||||
if( clk_sel == cgu::CLK_SEL::PLL1 ) {
|
if( clk_sel == cgu::CLK_SEL::PLL1 ) {
|
||||||
set_m4_clock_to_pll1();
|
set_m4_clock_to_pll1();
|
||||||
} else {
|
} else {
|
||||||
power_down_pll1();
|
power_down_pll1();
|
||||||
}
|
}
|
||||||
|
|
||||||
update_peripheral_clocks(clk_sel);
|
|
||||||
|
|
||||||
start_peripherals(clk_sel);
|
start_peripherals(clk_sel);
|
||||||
|
|
||||||
if( clk_sel != cgu::CLK_SEL::XTAL ) {
|
if( clk_sel != cgu::CLK_SEL::XTAL ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user