diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/stm32f47_mcuconf.h b/libraries/AP_HAL_ChibiOS/hwdef/common/stm32f47_mcuconf.h index a8120d85c9..eef1f372d9 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/stm32f47_mcuconf.h +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/stm32f47_mcuconf.h @@ -85,7 +85,18 @@ #if !defined(HAL_CUSTOM_CLOCK_TREE) #if defined(STM32F7xx_MCUCONF) // F7 clock config -#if STM32_HSECLK == 8000000U +#if STM32_HSECLK == 0U +#undef STM32_HSE_ENABLED +#undef STM32_HSI_ENABLED +#undef STM32_PLLSRC +#define STM32_HSE_ENABLED FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_PLLSRC STM32_PLLSRC_HSI +#define STM32_PLLM_VALUE 8 +#define STM32_PLLN_VALUE 216 +#define STM32_PLLP_VALUE 2 +#define STM32_PLLQ_VALUE 9 +#elif STM32_HSECLK == 8000000U #define STM32_PLLM_VALUE 8 #define STM32_PLLN_VALUE 432 #define STM32_PLLP_VALUE 2