Skip to main content
TDele.1
Associate III
July 6, 2021
Question

Screen jitters with animation

  • July 6, 2021
  • 15 replies
  • 3602 views

Hello,

I'm currently developing a project using Touchgfx on a custom board with a STM32F469II, external RAM/FLASH, SD card and a 1024x600 screen.

I've recently come across an issue when performing any animation (slide screen transition, scrollable container, box/circle progress, ...) where the screen shakes like crazy (see video) and also during a small moment after.

Any movement seem to be able to trigger this issue and the only way I've found to stop it is to disable chrom-art but then the frame rate drops down to about 15 fps when performing those animation.

Does anyone know what's causing this shaking ? And if so, how can I limit it as much as possible ?

Thanks in advance,

Tristan

This topic has been closed for replies.

15 replies

ktrofimo
Senior III
July 7, 2021

Take a look at ​https://community.st.com/s/feed/0D53W00000uWVawSAG. Looks like similar problem...

TDele.1
TDele.1Author
Associate III
July 7, 2021

Thank you for the link. I've read the discussion and the application note and I've gathered the following possible problems :

  • "Optimizing burst read" does not apply to my board I believe since I have a screen of 1024x600 and colors in RGB565 (and 1024*2 = 2048 bytes which is a multiple of 64 and 128).

  • "Optimizing the LTDC framebuffer fetching" by putting each frame buffer in different banks in the SDRAM. I use to have the same issue as ​​https://community.st.com/s/feed/0D53W00000uWVawSAG where the screen shaking happended even when the screen stayed still. Moving the frame buffers into different banks solve that issue for me but the issue comes back when performing animations (with a SDRAM with 4 2MB banks, the first framebuffer is in the first bank, the second in the second, the animation storage in the third and the dynamic bitmap cache in the forth).

  • "Minimize number of widgets" seems unlikely to be the issue since the issue occurs even for a simple scrollable container with only 13 flex buttons. It also happends during slide transition.

  • "increase FP and BP" does not seem to have any impact on the screen jittering.

  • "increase SDRAM frequency" is impossible since with an IS42S16400J-7TLI and the parameters I've setup, I'm already at the maximum frequency of 143 Mhz.

  • "concurrent access to SDRAM" could be the issue. I've setup a "sreen shot" function in my gui where I go read directly the frambuffer and put the value i find in a .bmp file in a SD card and a huge screen tearing effect happends when I do that, similar to the one occuring with the scrolling container. However, I do not now what's causing this for the animation/screen transition everywhere else.

Henceforth I'm still unsure to what's causing the jittering and how to fix it...

Tristan

waclawek.jan
Super User
July 7, 2021

That you can't use any of the possible improvements doesn't mean that you haven't exhausted the available resources/bandwidth.

JW

ktrofimo
Senior III
September 24, 2021

Just for info: I am using similar hardware and 32bit SDRAM @140MHz is busy at about 30% of bandwidth (screen is also 1024x600 @30MHz). Just for tests I have limited SDRAM bus down to ​16 bits and display still was working fine

MM..1
Super User
September 24, 2021

Which version TGFX? How you test it?

MM..1
Super User
September 24, 2021

We have same issue on 469 have you any improvement ?

TDele.1
TDele.1Author
Associate III
September 24, 2021

Not really a solution but if you disable the chrom-art, the jitter completely stops but the FPS might drop quite a lot during those animation.

A way to greatly reduce the jitter was, in my projet, to make sure that no screen buffer is shared between 2 banks on the external RAM. I wanted to save SDRAM space to put a bigger dynamic bitmap cache and thus I put the frame buffers as close as I could but I've found that doing this greatly impacts the screen stability. Instead, I've put the 2 frame buffers and the animation storage space in separate spaces (I've got a 8M SDRAM and each bank is 2M) and the jittering, while still there, was much bearable.

Eventually if nothing has worked so far, I've found that the jitter is really at its peak when either a scroll container is on the screen or you're performing a slide transition. If you drop those maybe it would prevent the screen from shaking.

I think this might be more of an hardware performance issue since I'm not using the speediest SDRAM/MCU with one of the bigger screen. Hopefully you might find a workaround that's fine for you but I've disable chrom-art and tried to limit my animations and it has worked so far.

Tristan

ktrofimo
Senior III
September 25, 2021

Today I was playing with Debug/Release configurations and suddenly Release one gave me terrible screen jitter and distortion. The main difference was a code optimization (for size) in Release configuration, while Debug has no optimization at all, and Debug is working fine. When I disabled optimization for Release all problems are gone.​

MM..1
Super User
September 26, 2021

Yes this too have very terrible efects, but use without optimizations isnt way.

HP_it
Senior II
September 25, 2021

have you tried triplebuffering / animation storage?

MM..1
Super User
September 27, 2021
Yes , but this change nothing. A. Little improved is with change STM32DMA disable fill over chromART BlitOperations STM32F4DMA::getBlitCaps() { return static_cast( /*BLIT_OP_FILL | BLIT_OP_FILL_WITH_ALPHA | */ BLIT_OP_COPY | BLIT_OP_COPY_WITH_ALPHA | BLIT_OP_COPY_ARGB8888 | BLIT_OP_COPY_ARGB8888_WITH_ALPHA | BLIT_OP_COPY_A4 | BLIT_OP_COPY_A8); } B. Between screens on loading stage this don’t helps, seems as lib erase framebuffer with fill DMA. Now on 469 DSI displays is very hard or impossible use multi screen . Need solution from ST.
HP_it
Senior II
September 27, 2021

I think you should share the project files so other people can verify and investigate the issue further :)