cancel
Showing results for 
Search instead for 
Did you mean: 

Screen borders switched when performing complex animations with DMA2D

TDele.1
Associate III

Hello everyone,

I'm currently developing a project using Touchgfx on a custom board with a STM32F469II and a 1024x600 screen on RGB565 format. i'm using an external flash running at 100 MHz and an external SDRAM of 8 MB with 4 banks used like so:

  • The first bank contains the first frame buffer.
  • The second bank contains the second frame buffer (use for multi-buffering).
  • The third bank is the animation storage space (use for slide transition between screens).
  • The end of the third bank and the forth bank contains the dynamic bitmap cache where I put pictures from the SD card (my external flash of 8MB is already full).

I'm having a trouble where, when I'm performing some animations, a part of the screen is swapped horizontally (see pictures where I've reproduced what this looks like). This happens for a frame or 2 at a time but is very noticeable. Here's what information I could gather:

  • This only happens when the DMA2D in on (If I stop it, the MCU load reaches above 80%, the screen visibly lags a lot and the fps drops to less than 20 at the same times when the error would occur).
  • The issue only happends :
    • 1) before a slide screen transition (looks like "Background_error_2.png") but not during the actual animation.
    • 2) continuously when a scroll container is being used (looks more like "Background_error_1.png"
    • 3) while another task is performing a resource consuming action in the background (like importing several pictures from the SD card)
  • The issue does not happen when using a slider, using an analog clock, performing an animation with the pictures stored in the bitmap cache, ...
  • The shaking is still present if I remove everyting except the scroll container or perform a transition between screens with only box widgets (although the more some stuff is happening at once on the screen, the worst it gets).
  • The swapping never happends vertically between the up and down parts of the display. It is always the right part of the screen that appears at the left most part of the screen.

I've been on and off on this issue for months and so far I've tried:

  • Moving/increasing the frame buffers size (the jittering gets a lot worst when the frame buffers are shared between 2 banks in the external RAM).
  • Changing screen parameters like the LCD-TFT clock (up to 48 MHz), the horizontal/vertical synchronization width (down to 2 pixels), the pixel format, ...
  • Removing framerate compensation which only slows down the screen but the shaking is still there (unlike when disabling the DMA2D which removes the issue but then a lot of frame are skipped and the display lags).
  • Locking or unlocking DMA to front porch which does not visibly change anything.
  • Removing the bitmap cache.
  • Changing board and screen.

I'm guessing this must be a performance issue but I fail to see what I must do to make this better (I've seen some tips to get good performance over the touchGFX website but nothing seems to fix it). I would welcome any advice over how can I make this swapping screen issue stop or at least reducing it as much as possible.

Tristan

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief III

Primary try go down with LCD Clock 20-30MHz. On big screen preloading next screen block actual screen or preloading any complicated object

The issue only happends :

  • 1) before a slide screen transition 

View solution in original post

2 REPLIES 2
MM..1
Chief III

Primary try go down with LCD Clock 20-30MHz. On big screen preloading next screen block actual screen or preloading any complicated object

The issue only happends :

  • 1) before a slide screen transition 

TDele.1
Associate III

I wanted to not go under the screen recommendation of about 45 MHz but by decreasing it further down under 40 MHz, the screen is not glitching anymore when I activate the DMA2D. This basically fixed all my problems, thank you.