aboutsummaryrefslogtreecommitdiffstats
path: root/boards/base/STM32F746-Discovery/board_STM32LTDC.h
diff options
context:
space:
mode:
Diffstat (limited to 'boards/base/STM32F746-Discovery/board_STM32LTDC.h')
-rw-r--r--boards/base/STM32F746-Discovery/board_STM32LTDC.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/boards/base/STM32F746-Discovery/board_STM32LTDC.h b/boards/base/STM32F746-Discovery/board_STM32LTDC.h
index 8ad0dfa4..231d51b3 100644
--- a/boards/base/STM32F746-Discovery/board_STM32LTDC.h
+++ b/boards/base/STM32F746-Discovery/board_STM32LTDC.h
@@ -11,7 +11,7 @@
#include "stm32f746g_discovery_sdram.h"
#ifndef GFX_LTDC_USE_DIRECTIO
- #define GFX_LTDC_USE_DIRECTIO TRUE
+ #define GFX_LTDC_USE_DIRECTIO GFXON
#endif
#ifndef GFX_LTDC_TIMING_SET
/* Options are:
@@ -36,7 +36,7 @@
#define AFRH AFR[1]
#endif
-#define ALLOW_2ND_LAYER TRUE
+#define ALLOW_2ND_LAYER GFXON
static const ltdcConfig driverCfg = {
480, 272, // Width, Height (pixels)
@@ -450,6 +450,7 @@ static GFXINLINE void init_board(GDisplay *g) {
RCC->PLLSAICFGR = ((STM32_PLLSAIP_VALUE/2-1)<<16) | (STM32_PLLSAIN_VALUE << 6) | (STM32_PLLSAIR_VALUE << 28) | (STM32_PLLSAIQ_VALUE << 24);
RCC->DCKCFGR1 = (RCC->DCKCFGR1 & ~RCC_DCKCFGR1_PLLSAIDIVR) | STM32_PLLSAIR_POST;
RCC->CR |= RCC_CR_PLLSAION;
+ while(!(RCC->CR & RCC_CR_PLLSAIRDY)); // wait for PLLSAI to lock
#endif
// Initialise the SDRAM