mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 22:35:23 +03:00
Merge pull request #7246 from mikeller/move_mco_init
Moved 'mcoInit()' to after 'OverclockRebootIfNecessary()' to have it execute only once.
This commit is contained in:
commit
131e32c142
1 changed files with 5 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue