Our product using and STM32F769 + OTM8009A LCD screen (the same as the DISCO_F769) has been working great for quite some time now. We’ve been using all the drivers provided by ST to have the LCD run and display images or play videos.
Recently, we have been working on enabling deep sleep in our product to reduce power consumption when it’s not used.
We’ve discovered that when exiting deep sleep the screen start behaving strangely until it completely stops working.
Colors are shifting when we turn off (deep sleep) and turn on (wake up) the video. Position is also shifting. If you do that in a loop, sometimes it “works again” then fails again until it eventually crashes completely.
The PR adding the bug is here:
Our guess is that there are issues with the DSI or LTDC clock when deep sleeping / waking up, but we don’t even know where to start looking…
Hi
From STM32F769 ref manual, I can see that DSI/LTDC clock is coming from PLL, which is stopped during STOP mode (mbed-os deepsleep)…
You could also try STM32 community forum, as this question is not directly related to mbed-os…
Good luck, Jerome
Reseting PLL for DSI and LTDC seems to help quite a bit but after a few deep sleep/wake ups it stops working. The program keeps running, no hard fault or reset, but the screen just doesn’t work.
It’s like something gets out of sync.
We are absolute noobs on this topic and there are so many parameters that it’s really hard to know what to add/remove/modify.
Things must be initialized in a very specific order or they just don’t work.
Skimming though ST’s code base helps a bit but it’s full of boiler plate code and hard to know what is really needed and what is not…
It is hard to help because your code is very sophisticated and custom hardware maybe different.
Also documents aboutDSI/LTDC are hard to get.
I have two STM Disco F769 boards and they are completely different. The first has OTM display controller, but MCU Rev A which is different in DMA behavior.
The newer board rev has a Rev 1 for the MCU, but also a different graphics controller and different display, so even the examples don’t work.
When the problem can be reproduced on this board, I can try to help.
I guess it is not only resetting PLL, but also resetting registers for controlling the HSync/VSync need to be reset.
Yes, it’s very hard to reproduce as we are using custom hardware. It’s mostly based on the DISCO_F769 but the SD card reader is not the same, so it’s not easily possible to port all our code to the DISCO.
I’ve continued investigating but with no success. I found more interesting posts on ST’s community website that I’ll list here:
I tried some of the solutions but most of them are using TouchGFX which might be doing other stuff as well.
In our use case, the simplest solution would be to system reset the robot when exiting deep sleep. This is possible as we are using a state machine that can track the state of the robot, decide to turn off everything when entering our deep sleep state, allowing Mbed to deep sleep / enter stop mode.