How to turn on/off backlight of STM32H747I_DISCO board
I would like to turn off the backlight if the LCD module of STM32H747I_DISCO board. I figured out that the PJ12 (LCD_BL_CTRL, PORT = J PIN = 12) probably controls the backlight of the LCD module (from schematics). The "PJ12" is initialized in "main.MX_GPIO_Init()" and it is set to output to level low (GPIO_PIN_RESET) during POR.
I tried to set PJ12 to high and low with the follow HAL call:
void Screen1View::handleTickEvent()
{
if (++tickCount >= ScreenUpdateCount)
{
tickCount = 0;
updateScreen();
if (++lcdBackLightCount >= TurnOffLcdBacklightCount)
{
lcdBackLightCount = 0;
// Turn off LCD
HAL_GPIO_WritePin(GPIOJ, LCD_BL_Pin, GPIO_PIN_SET);
// HAL_GPIO_WritePin(GPIOJ, LCD_BL_Pin, GPIO_PIN_RESET);
}
}
}
but it did nothing. Backlight of the LCD stays always on.
The test app is based on TouchGFX.
Any idea?
Thanks,
Louis
