Skip to main content
Louie88
Senior
February 25, 2025
Question

How to detect if the LCD is touched on STM32H747I_DISCO board with TouchGFX

  • February 25, 2025
  • 1 reply
  • 840 views

Question moved from this thread.

Okay, now I can turn off the LCD/Backlight anytime, but I need to turn it back (on) if any part of the LCD Module is touched. I probably need to capture the TOUCH interrupt and turn the backlight on from the interrupt service routine. I could not find any usable idea in the community forum.

Thanks,

Louis

1 reply

jchernus-fikst
Senior
February 26, 2025

I believe you're right - you'll either want to turn it on from the ISR or you can set a flag in the ISR and, to keep it as short as possible, check for the flag in any polling function. In that function, you can do everything you need to do, including turning on the backlight. You might realise there's more to do than just turn on the backlight - you probably don't want the touch to be used to navigate somewhere since the user is touching a dark screen so you'll likely want to handle whether "touch just wakes up screen" vs "send touch coordinates to TouchGFX" logic there too.