2025-08-04 2:22 AM - last edited on 2025-08-04 2:39 AM by Andrew Neil
Split from TOUCHGFX and CPU.
My screen resolution is 480 * 800. When I use a dynamic graph with a capacity setting of 300 and add 30 points each time, the number of executions of handleTickEvent per second drops from 30 to 2. What solutions are there?
Solved! Go to Solution.
2025-08-19 5:02 AM
Hello @Lewis233.
Viewed in isolation, the issue with handleTickEvent not being called 60 times per second can be resolved by inserting the following code (e.g. in the constructor of FrontendApplication):
HAL::getInstance()->setFrameRateCompensation(true);
By using frame rate compensation, TouchGFX ticks every 16 ms (assuming 60 FPS). However, if it is not possible to render a frame within one tick, the frame is skipped instead of slowing the animation or graph.
However, activating frame rate compensation only addresses a symptom. I assume the main issue is that the system cannot render the dynamic graph at 60 FPS.
Without more information about your hardware setup, it is difficult to provide detailed assistance. Could you please elaborate on the following:
1. Which MCU are you using?
2. What interface are you using for your display?
3. What type of dynamic graph are you using? (Wrap and Clear, Scroll, or Wrap and Overwrite)
Best regards,
Johan
2025-08-19 5:02 AM
Hello @Lewis233.
Viewed in isolation, the issue with handleTickEvent not being called 60 times per second can be resolved by inserting the following code (e.g. in the constructor of FrontendApplication):
HAL::getInstance()->setFrameRateCompensation(true);
By using frame rate compensation, TouchGFX ticks every 16 ms (assuming 60 FPS). However, if it is not possible to render a frame within one tick, the frame is skipped instead of slowing the animation or graph.
However, activating frame rate compensation only addresses a symptom. I assume the main issue is that the system cannot render the dynamic graph at 60 FPS.
Without more information about your hardware setup, it is difficult to provide detailed assistance. Could you please elaborate on the following:
1. Which MCU are you using?
2. What interface are you using for your display?
3. What type of dynamic graph are you using? (Wrap and Clear, Scroll, or Wrap and Overwrite)
Best regards,
Johan
2025-08-20 8:40 PM
1. I use stm32f469i-disco board.
2. ltdc + dsi-video
3. I use scroll dynamic graph with 100 capacity . Per handletickevent , i add a point that between -127 and 127;
2025-08-20 9:25 PM
int8_t tmp_cnt = -127;
void main_screenView::handleTickEvent()
{
audio_dynamicGraph.addDataPoint(tmp_cnt);
tmp_cnt = tmp_cnt + 20;
}
1. I tested add a point per second.
But a lot of points in scroll-graph,the frame rate will change 40hz to 10 hz.
The screen refresh rate need least 25hz.
T。T