Hello,
I'm facing with very strange problem using STemWin library.
I don't know if this is problem on my side, on STemWin (ST) side or directly from Segger, so I'm asking here also. I've also make the same post on ST forum, but no success for now.
What's my idea.
I have a graph with (for now) one curve on it and I'm trying to update it every 100ms.
On STM32F429-Discovery using driver provided from ST I see flickering and my idea is that LCD shows LTDC layer 2, but EMWIN draws everything on layer1 on LCD which is hidden.
Then, after each emwin operation is done, I would copy content from layer1 (EMWIN drawing layer) to layer2 (user visible layer) to avoid flickering.
It works what I wanna do, but no in a way I wanna do.
My idea is, to copy layers only if there were pending tasks done with emwin using GUI_Exec function.
According to the emWin documentation, GUI_Exec returns 1 if there were tasks to do.
So when GUI_Exec() returns non-zero value, I would then also copy layer1 to layer2.
But here is problem with GUI_Exec function. This function returns non-zero value only FIRST time when I call it. I call it first time after I set my graph.
Each next time, function successfully does its job with updating everything, but it does not return non-zero value anymore so I can't know if there were pending tasks done to copy layers.
Has this something to do with ST's implementation or is this Segger related problem?
PS: STemWin 5.26 is in use without any Cube software. On version 5.22 I got the same behavior.
Below is my example how I use this (comments included where I had problem):
pastebin.com/FFrEnHK0
For some reason C code was not properly shown on this site, so I used pastebin.
Thanks for any help you can provide here.
I'm facing with very strange problem using STemWin library.
I don't know if this is problem on my side, on STemWin (ST) side or directly from Segger, so I'm asking here also. I've also make the same post on ST forum, but no success for now.
What's my idea.
I have a graph with (for now) one curve on it and I'm trying to update it every 100ms.
On STM32F429-Discovery using driver provided from ST I see flickering and my idea is that LCD shows LTDC layer 2, but EMWIN draws everything on layer1 on LCD which is hidden.
Then, after each emwin operation is done, I would copy content from layer1 (EMWIN drawing layer) to layer2 (user visible layer) to avoid flickering.
It works what I wanna do, but no in a way I wanna do.
My idea is, to copy layers only if there were pending tasks done with emwin using GUI_Exec function.
According to the emWin documentation, GUI_Exec returns 1 if there were tasks to do.
So when GUI_Exec() returns non-zero value, I would then also copy layer1 to layer2.
But here is problem with GUI_Exec function. This function returns non-zero value only FIRST time when I call it. I call it first time after I set my graph.
Each next time, function successfully does its job with updating everything, but it does not return non-zero value anymore so I can't know if there were pending tasks done to copy layers.
Has this something to do with ST's implementation or is this Segger related problem?
PS: STemWin 5.26 is in use without any Cube software. On version 5.22 I got the same behavior.
Below is my example how I use this (comments included where I had problem):
pastebin.com/FFrEnHK0
For some reason C code was not properly shown on this site, so I used pastebin.
Thanks for any help you can provide here.
The post was edited 2 times, last by TilenMajerle ().