1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Moved 'mcoInit()' to after 'OverclockRebootIfNecessary()' to have it execute only once.

This commit is contained in:
mikeller 2018-12-19 17:45:11 +13:00
parent c9788f1831
commit 4a62a006ca

View file

@ -301,12 +301,6 @@ void init(void)
}
#endif
// Configure MCO output after config is stable
#ifdef USE_MCO
mcoInit(mcoConfig());
#endif
// Note that spektrumBind checks if a call is immediately after
// hard reset (including power cycle), so it should be called before
// systemClockSetHSEValue and OverclockRebootIfNecessary, as these
@ -337,6 +331,11 @@ void init(void)
OverclockRebootIfNecessary(systemConfig()->cpu_overclock);
#endif
// Configure MCO output after config is stable
#ifdef USE_MCO
mcoInit(mcoConfig());
#endif
timerInit(); // timer must be initialized before any channel is allocated
#ifdef BUS_SWITCH_PIN