cancel
Showing results for 
Search instead for 
Did you mean: 

Scroll Performance Drop in Scroll Wheel After TouchGFX 4.24/4.25 → 4.26 Regeneration

nico23
Senior III

MCU: STM32H7S7L8H6H
Issue: Choppy scroll animations after regenerating TouchGFX/target/generated in CubeMX files with TouchGFX 4.26 (previously 4.24.1 or 4.25)

Symptoms

Scroll wheel with custom containers (toggle buttons + text) now shows low FPS when swiping. The same widget was way smoother before regeneration. I have a device with old generated files still running smoothly, confirming the regression is in the regenerated target code (check video, the smoother one is the bottom one).

Unfortunately, I haven't git the  TouchGFX/target/generated because I thought it was being generated by TouchGFX Designer and not CubeMX, so I have no idea what code it was running before. Sure thing is, the scroll wheel logic in the GUI folder is the same for both things.

I was already using TouchGFX Designer updated to 4.26 when everything was smooth so, I think the file generated by it are ok.

What Changed

Regenerated via CubeMX, replacing:

  • nema_hal.c
  • OSWrappers.c
  • STM32DMA.cpp
  • Other target files

Unfortunately wasn't tracking these in git.

What Hasn't Changed

  • FreeRTOS (same version, no updates)
  • HAL drivers (git tracked, unchanged)
  • GPU2D Command List Size (still 8192) [I've tried to increase it to 16k but still, the same issue)
#define RING_SIZE                      1024 /* Ring Buffer Size in byte */
#define NEMAGFX_MEM_POOL_SIZE          24320 /* NemaGFX byte pool size in byte */
#define NEMAGFX_STENCIL_POOL_SIZE      619520 /* NemaGFX stencil buffer pool size in byte */
  • .icf and memory allocation
  • Not using setFrameRateCompensation(true);

Question

What could have changed in TouchGFX 4.26 generated target files to cause this performance drop? Or what part of the code was changed to have this kind of behavior? .icf file and the memory allocation are the same as well.

Has anyone experienced similar issues with TouchGFX 4.26 or similar problems?

1 ACCEPTED SOLUTION

Accepted Solutions
nico23
Senior III

After various tweaks, I've found out that reducing the size of the scroll wheel from 800x313 to 629x313 (I've found that the containers in the scroll wheel were using a bunch of transparent area that was not necessary), so a reduction of 22% of the area of the scroll wheel does improve the performance significantly.

That still doesn't explain the drops in performance because the two boards run the same software, despite the updated TouchGFX code in the target-generated folder.

Has there been an update targeting scrool wheel from 4.24.1 to 4.26?

I'm just seeing "Fixed bug in ScrollableContainer where scrollbars had wrong size."

On another note, I've also increased memory for TouchGFX in the FreeRTOS from 

.stack_size = 4096 * 4,

to

 

.stack_size = 4096 * 8,

 And performances have increased significantly and no more errors occured

View solution in original post

1 REPLY 1
nico23
Senior III

After various tweaks, I've found out that reducing the size of the scroll wheel from 800x313 to 629x313 (I've found that the containers in the scroll wheel were using a bunch of transparent area that was not necessary), so a reduction of 22% of the area of the scroll wheel does improve the performance significantly.

That still doesn't explain the drops in performance because the two boards run the same software, despite the updated TouchGFX code in the target-generated folder.

Has there been an update targeting scrool wheel from 4.24.1 to 4.26?

I'm just seeing "Fixed bug in ScrollableContainer where scrollbars had wrong size."

On another note, I've also increased memory for TouchGFX in the FreeRTOS from 

.stack_size = 4096 * 4,

to

 

.stack_size = 4096 * 8,

 And performances have increased significantly and no more errors occured