mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 03:50:02 +03:00
Implement configurable system clock generation
PLL-HSE working PLL-HSI working Move SystemCoreClockUpdate in SystemInit to end Switching from HSI-PLL to HSE-PLL (and back) is working It works during various levels of overclocking. Renamed CLI variable hse_mhz to system_hse_mhz Restored the original position of the spectrum bind code The internal logic of the spectrum bind code will prevent binding process to fire if executed after soft reset. Remove stale call to delay Add a comment about call to spektrumBind placement Declared SystemXXXSource functions, handled sign-ness warning. Cleaned up commented out sections USB clock generation for F446 Default HSE value for backward compatibility Cleaned up more unused stuff Handle non-F4 targets Added comment about PLL_M selection Removed fake gyro/acc from test target
This commit is contained in:
parent
2a748e73d0
commit
569f0bae62
9 changed files with 187 additions and 120 deletions
|
@ -3594,6 +3594,22 @@ static void cliStatus(char *cmdline)
|
|||
|
||||
cliPrintf("CPU Clock=%dMHz", (SystemCoreClock / 1000000));
|
||||
|
||||
#ifdef STM32F4
|
||||
// Only F4 is capable of switching between HSE/HSI (for now)
|
||||
int sysclkSource = SystemSYSCLKSource();
|
||||
|
||||
const char *SYSCLKSource[] = { "HSI", "HSE", "PLLP", "PLLR" };
|
||||
const char *PLLSource[] = { "-HSI", "-HSE" };
|
||||
|
||||
int pllSource;
|
||||
|
||||
if (sysclkSource >= 2) {
|
||||
pllSource = SystemPLLSource();
|
||||
}
|
||||
|
||||
cliPrintf(" (%s%s)", SYSCLKSource[sysclkSource], (sysclkSource < 2) ? "" : PLLSource[pllSource]);
|
||||
#endif
|
||||
|
||||
#ifdef USE_ADC_INTERNAL
|
||||
uint16_t vrefintMv = getVrefMv();
|
||||
int16_t coretemp = getCoreTemperatureCelsius();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue