Skip to main content
December 25, 2020
Question

RTC update lag

  • December 25, 2020
  • 1 reply
  • 998 views

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.

This topic has been closed for replies.

1 reply

HP_it
Senior II
December 26, 2020

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.

December 26, 2020

Simulator USE X64 architecture, not ARM M4 architecture

MM..1
Chief III
December 27, 2020

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