cancel
Showing results for 
Search instead for 
Did you mean: 

GUI flickering & fluctuating between screens during eeprom read write.

Shiv09
Associate III

Hello All,

 

I am working on the touchgfx project and have an application where I have created some screens and performing the different operations while button pressed.

I am writing and reading the data content to external EEPROM, eg, some 10-15 parameters while button is pressed and reading it while other button is pressed.

 

Before adding the Eeprom operation My Screens and operations were working fine and fluently, but after adding the code for writing the parameters to eeprom, the screens started to flicker between screens and the GUI is getting distorted. 

This is not normal behavior, Can any one suggest how shall I take care of it or what would be the best way to perform external Eeprom read write operations, without interrupting the GUI ?

 

Regards,

Shi

 

18 REPLIES 18

> Though I have been using the Message queue between GUI thread and other UART thread which doesn't cause lot trouble but when only when, Tring to write some data with delay (Changed from 5 millisec to 1 milli sec), still able to see flickering and fluctuations on screen with buttons.

If you do so, especially the delays, from within an interrupt context, you will surely run into exactly such problems.
Mind you, all Cube generated interrupt callbacks run in interrupt context.

Hello @Ozone 

 

Thanks for the suggestion, Yes there was a 5 milli sec delay for write operation which I reduced to 1 milli sec, but still observed the flickering, tried to reduce the clk from 51 mhz to 18.1 mhz the flickering got reduced to better level but not resolved completely. 

I just what to know if there is any better way to solve this problem. if you need i can share the images of function snippets, hope that could help just let me know which files and function you need will share may be that will give better idea.

 

Br,

Shi

Ohhh boy, start with reply why you save to EEPROM on running system.? Normal is save before power OFF.

Second why do this in model tick. Model tick is executed on screen transitions and disrupt GUI if block.

Then go back to start AND SHOW CODE

Okay, For Eeprom operations will try without interrupt, hope that should solve the trouble.

Hello @MM..1 ,

 

The functions are in Model.cpp, not in the Tick function, I guess there is some confusion. 

 

Some of the Data I am saving while device is turned off. but there are some scenario where I need to save some structure having 10-15 parameters to be saved into EEprom at run time, and Load those parameters also, hence need to go this way.  Just to avoid confusion here are the screen shots

Shiv09_0-1761136797416.png

Shiv09_1-1761136833306.png

Shiv09_2-1761136868119.png

 

 

Your showed screens is irelevant, show as code where you call this read and write ...

///code place as code no image

plus show source of  eeprom_st24c256 func...

Okay, Here are the functions which are been call for Write Read operations

Shiv09_0-1761197789688.pngShiv09_1-1761197826187.pngShiv09_2-1761197905142.png

These operations are called from Model.cpp, eg void Model::loadMainSettings not from void Model::tick() function, 

@Shiv09 you still not show where you call loadMainSettings !! And for I2C operation this type is optimal DMA .

Okay I am calling from the Screen Presenter, and this is called from Screen View, this is just one of the examples which I am using for read /Write operation. 

View-> Presenter-> Model,