2020-05-06 12:41 PM
Hi,
I followed the touchGFX workshop today and at a certain point we had a discussion about the problem of using state preserving low power modes of the cpu in combination with running touchGFX.
The example that triggered the discussion during the course was one where the touch display is constantly being polled over I2C for input which of course prevent long low power times if you want to wake up from someone touching the display. I got the feeling from the responses (and also from another participant who told me he just does a reset of the entire cpu after sleep/low power) that it was more problematic than just this as the i2c touch issue could be solved by using an iqr from the touch peripheral. Is that correct, is there some fundamental problem in using touchGFX in combination with eg stop mode of an STM32F429 to reach +-1mA power consumption but instant wakeup times (to give a very concrete example)?
If so in where lies the problem exactly ? I can imagine is that maybe the touchGFX library directly communicates with HW blocks that need to be reinitialized after the low power mode ? In that case an extra API call to signal going into and leaving low power mode would be required then to support this I assume ?
Other reasons ?
Are there any plans of adding low power support this in the future. Because if low power is problem that automatically excludes usage of touchGFX in battery powered devices (unless you have an application that is able to start up really fast to the pre sleep state so you can hide a total reset from the user).
Thanks
Bram
2020-05-12 06:21 AM
There's no problem. TouchGFX is driven by external signals like interrupts from the display or from a display controller. If you go into low power mode and you stop those signals from happening during that time, then TouchGFX will not render anything and the touch IC won't get sampled. If you're using interrupt-based i2c communication for touch, then you just disable that interrupt as well.
So, TouchGFX does not really care about low-power mode. It's up to whoever is integrating the GUI application with the rest of the system to handle what happens to the rendering mechanism when low power mode is entered.
/Martin
2020-11-03 12:29 AM
> you go into low power mode and you stop those signals from happening during that time
How is this achieved?
There is void TouchGFXHAL::disableInterrupts(), but only in private member of static TouchGFXHAL hal(dma, display, tc, 240, 320);
EDIT:
Seems that __HAL_LTDC_DISABLE(&hltdc); does the trick.