cancel
Showing results for 
Search instead for 
Did you mean: 

RTC update lag

Hello dear friends,

The problem I have encountered is that updating the digital clock takes too much time. So I can see that some time updating takes up to 3 seconds, it is wonderful that other widgets don't stop and do their work.

I didn't understand what is really the source of the problem.

I use HAL for reading RTC, using the digital clock widget.

Touchgfx version: 4.15 (Didn't dare to upgrade to 4.16)

RTOS: Not yet used. (Planed for next times)

UC: STM32f429IGT6

USB: CDC Enabled

Compiler: Keil V5.32

Any help would be appreciated.

3 REPLIES 3
HP
Senior III

I just did a quick test with the digital clock widget. No problems updating as fast as I want.

Do you remember to call the 'invalidate' method right after you update the time? that could be a reason you don't see changes.

I tried this

  1. create the handleTickEvent method and a variable 'seconds' in the .hpp file for the view.
  2. In my view (MainView.cpp) I added the following code to be executed with each tick
void MainView::handleTickEvent()
{
	digitalClock1.setTime24Hour(12, 12, seconds);
	digitalClock1.invalidate();
	seconds++;
	if(seconds>59)
		seconds=0;
}

This works just as expeced with the seconds running really fast upwards.

A not though - this was on the simulator but I think the performance would be similar to what you can expect on HW.

Simulator USE X64 architecture, not ARM M4 architecture

Try show your fail working code instead of architecture advice...