cancel
Showing results for 
Search instead for 
Did you mean: 

Flicker-free display update after MCU wakes from STANDBY?

Antypas.Peter
Senior

I'm using TouchGfx 4.6.1 (I know, pretty old Draupner code from 3 years ago). The application runs on a STM32F469 with an AMOLED MIPI-DSI display.

I am trying to render a screen, put the processor into STANDBY, the display into its lowest power idle mode, then wake up the MCU periodically and update the screen. I have the DSI part down. What I can't figure out is how to make TouchGFX not "flicker" with an obvious erase-then-re-render of the GUI. Think of a LED digital clock updating once a minute. That's the effect I'm after.

I have no problem achieving this in very manual graphics code against AMOLEDs, as I have complete control over the sequence of rendering and transferring the framebuffer. I'm not sure how to achieve this in TouchGFX, as it seems to be continuously rendering and transferring in the background (it seems to be very animation-oriented). Is there a simple way to do it? Should I use double buffering?

Thanks,

Peter

3 REPLIES 3
Martin KJELDSEN
Chief III

Hi @Antypas.Peter​,

Just to be absolutely sure. You're displaying a frame on your DSI display. Then you put MCU into Idle mode (still displaying this frame on screen? or is display turned off?). If you're rendering simple frames, transferring those frames to display, then powering down - What are you doing when you wake up every once in a while to redraw the frame (even if no changes?) ?

It should not be necessary to use double buffering with DSI displays but you can give it a shot just to see.

Rendering frames in TouchGFX is driven by external sync signals. If the LTDC/DSI interrupts are disabled, nothing will be updated in the framebuffer(s).

Just shooting ever which way and trying to get some more information here.

Thanks!

Best regards,

Martin

Antypas.Peter
Senior

OK, let me fill in more details:

I run TouchGFX at full 60Hz rendering a GUI for a few seconds. Then I stop the sync signals, leave the display on, send it a DSI command to place it in "idle" mode to minimize current draw, and put the MCU in standby. Now the display is showing a static frame - a digital clock with some additional data.

The framebuffer lives in external SDRAM which automatically powers down and thus loses its contents when the MCU enters STANDBY.

I use an RTC alarm to wake the MCU at the next minute changeover. Now I want to refresh the frame. There will be changes to the frame (at least time has changed). If the user does not touch the display, I want to put the MCU back into standby ASAP and repeat this process.

So the challenge here is that rendering is driven by the frame sync interrupts and transfer from framebuffer to display is driven by DSI Tear Enable interrupts (I think), so it appears that we're rendering partial updates to the screen which causes a very visible flicker. Looking at the TouchGFX HAL I see functions to lock/unlock the framebuffer but I don't think this would help. I want to finish rendering the framebuffer in its entirety before transferring anything to the display. Is this doable within TouchGFX, or is it outside the scope of the framework?

Thanks,

Peter

Martin KJELDSEN
Chief III

Hi,

Thanks for the detailed update. Okay, i see now. So what's actually happening, as you guessed, is that the framebuffer "state" and the HAL state come out of sync because the SDRAM loses the current frame. So, when waking up you need to redraw everything and start from scratch instead of just redrawing partial elements because you THINK you've already got the rest of the frame in the FB.

I need to go, but i'll give it some thought.

/Martin