mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-11 15:29:28 -05: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();
|
||||
|
||||
update_peripheral_clocks(clk_sel);
|
||||
|
||||
if( clk_sel == cgu::CLK_SEL::PLL1 ) {
|
||||
set_m4_clock_to_pll1();
|
||||
} else {
|
||||
power_down_pll1();
|
||||
}
|
||||
|
||||
update_peripheral_clocks(clk_sel);
|
||||
|
||||
start_peripherals(clk_sel);
|
||||
|
||||
if( clk_sel != cgu::CLK_SEL::XTAL ) {
|
||||
|
Loading…
Reference in New Issue
Block a user