mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-13 16:35:55 +00:00
Move update_peripheral_clocks
Incorrect order of operations would hang execution if switching to IRC.
This commit is contained in:
@@ -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 ) {
|
||||||
|
Reference in New Issue
Block a user