902 views
in Embedded Wizard Studio by
Is possible eliminate the white screen flashing effect at the switch-on ?

1 Answer

0 votes
by
Hello,

of course, you can switch off the LCD backlight during start-up and switch it on after the first screen update has happened.

You can see this within the Build Environments for STM32F469 / F769 - there the backlight is swiched on when the first DSI update is done, otherwise pixel garbage is shown for a short time.

Best regards,

Manfred.
by
So with software command or hardware jump ?
by
Probably I need to change the order of the set LCD_BL_CTRL pin D8 PK3
by
Is there a fast method to control this pin like this ?

int main( void )
{
  PK3 = 0;  << not compile

  /* initialize system */
  EwBspConfigSystem();
by
Please have a look to stm32f7xx_hal_gpio.c (HAL_GPIO_Init(), HAL_GPIO_WritePin())
by
ok I can modify the pin with these lines but how to recompile the source stm32746g_discovery_lcd.c to exclude the switch-on of the backlight in the BSP_LCD_Init() function ?

int main( void )
{
    HAL_Init();

    __GPIOC_CLK_ENABLE();
    GPIO_InitStructure.Pin   = GPIO_PIN_3;
    //GPIO_InitStructure.Pin   = LCD_BL_CTRL_PIN
    GPIO_InitStructure.Mode  = GPIO_MODE_OUTPUT_PP;    
    GPIO_InitStructure.Pull  = GPIO_PULLUP;
    GPIO_InitStructure.Speed = GPIO_SPEED_HIGH;  
    HAL_GPIO_Init(GPIOA, &GPIO_InitStructure);

    HAL_GPIO_WritePin(GPIOA, GPIO_PIN_3, GPIO_PIN_RESET);
by
stm32746g_discovery_lcd.c is part of the STM32F746-Discovery build environment.

You can find and modifiy it below '\STM32F746-Discovery\ThirdParty\STM32Cube_FW_F7\Drivers\BSP\STM32746G-Discovery'

It will be rebuilt during project build process. If not, please clean the project before.
by
Using make clean only these source are recompile (see list below) and these does not inlcude

\STM32F746-Discovery\ThirdParty\STM32Cube_FW_F7\Drivers\BSP\STM32746G-Discovery

where is located the source stm32746g_discovery_lcd.c

 

Compiling ../../Source/ewmain.c
Compiling ../../Source/DeviceDriver.c
Compiling ../../GeneratedCode/Core.c
Compiling ../../GeneratedCode/Effects.c
Compiling ../../GeneratedCode/Graphics.c
Compiling ../../GeneratedCode/Resources.c
Compiling ../../GeneratedCode/Views.c
Compiling ../../GeneratedCode/Application.c
Compiling ../../GeneratedCode/Templates.c
Compiling ../../GeneratedCode/WidgetSet.c
Compiling ../../../PlatformPackage/RTE/ewextrte.c
Compiling ../../../PlatformPackage/RGB565/ewextgfx.c
Compiling ../../../TargetSpecific/ew_bsp_system.c
Compiling ../../../TargetSpecific/ew_bsp_clock.c
Compiling ../../../TargetSpecific/ew_bsp_event.c
Compiling ../../../TargetSpecific/ew_bsp_display.c
Compiling ../../../TargetSpecific/ew_bsp_touch.c
Compiling ../../../TargetSpecific/ew_bsp_serial.c
Compiling ../../../TargetSpecific/ew_bsp_inout.c
Compiling ../../../TargetSpecific/ew_bsp_graphics.c
Compiling ../../../TargetSpecific/stm32f7xx_it.c
Compiling ../../../TargetSpecific/system_stm32f7xx.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rcc_ex.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_cortex.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_gpio.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_sdram.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_ltdc.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_dma2d.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_i2c.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_spi.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_ll_fmc.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_uart.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_pwr_ex.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_tim_ex.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rtc.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_rtc_ex.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/BSP/Components/ft5336/ft5336.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/BSP/STM32746G-Discovery/stm32746g_discovery.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/BSP/STM32746G-Discovery/stm32746g_discovery_sdram.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/BSP/STM32746G-Discovery/stm32746g_discovery_ts.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/STM32F7xx_HAL_Driver/Src/stm32f7xx_hal_qspi.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Drivers/BSP/STM32746G-Discovery/stm32746g_discovery_qspi.c
Compiling ../../../ThirdParty/TLSF/tlsf.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Middlewares/Third_Party/FreeRTOS/Source/list.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Middlewares/Third_Party/FreeRTOS/Source/queue.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Middlewares/Third_Party/FreeRTOS/Source/tasks.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Middlewares/Third_Party/FreeRTOS/Source/timers.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS/cmsis_os.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c
Compiling ../../../ThirdParty/STM32Cube_FW_F7/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM7/r0p1/port.c
by
Yes, you are right. In case of STM32746G-Discovery build environment stm32746g_discovery_lcd.c is not used.

All LCD related stuff is done in ew_bsp_display.c
by
Also if I comment these two lines in the source ew_bsp_display.c I see always the white flash at the switch-on.

  /* Assert display enable LCD_DISP pin */
  //HAL_GPIO_WritePin(GPIOI, GPIO_PIN_12, GPIO_PIN_SET);

  /* Assert backlight LCD_BL_CTRL pin */
  //HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_SET);
by
I had a short look into the schematics of STM32746G-Discovery.

The white flash on STM32746G-Discovery during switch-on can only be avoided by a small hardware modification.

During switch-on phase the STM32746 is in reset state, where all GPIOs are inactive.
You can reproduce it by pressing and holding the reset button. During holding the reset button the LCD gets white.
After releasing the button no more white flash occurs.

In the schematics of  STM32746G-Discovery you can see, that the back light is enabled in reset state by R85.
This resistor has to be removed and a pull-down resistor has to be added on the LCD_BL_CTRL pin to keep the back light off during switch-on phase.
by
good answer!  I will try soon

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...