diff --git a/drivers/display/display_stm32_ltdc.c b/drivers/display/display_stm32_ltdc.c index dd4232a57d0..6c2a0172050 100644 --- a/drivers/display/display_stm32_ltdc.c +++ b/drivers/display/display_stm32_ltdc.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -248,6 +249,32 @@ static int stm32_ltdc_init(const struct device *dev) return err; } +#if defined(CONFIG_SOC_SERIES_STM32F4X) + LL_RCC_PLLSAI_Disable(); + LL_RCC_PLLSAI_ConfigDomain_LTDC(LL_RCC_PLLSOURCE_HSE, + LL_RCC_PLLSAIM_DIV_8, + 192, + LL_RCC_PLLSAIR_DIV_4, + LL_RCC_PLLSAIDIVR_DIV_8); + + LL_RCC_PLLSAI_Enable(); + while (LL_RCC_PLLSAI_IsReady() != 1) { + } +#endif + +#if defined(CONFIG_SOC_SERIES_STM32F7X) + LL_RCC_PLLSAI_Disable(); + LL_RCC_PLLSAI_ConfigDomain_LTDC(LL_RCC_PLLSOURCE_HSE, + LL_RCC_PLLM_DIV_8, + 192, + LL_RCC_PLLSAIR_DIV_4, + LL_RCC_PLLSAIDIVR_DIV_8); + + LL_RCC_PLLSAI_Enable(); + while (LL_RCC_PLLSAI_IsReady() != 1) { + } +#endif + /* reset LTDC peripheral */ __HAL_RCC_LTDC_FORCE_RESET(); __HAL_RCC_LTDC_RELEASE_RESET();