cancel
Showing results for 
Search instead for 
Did you mean: 

Weird behavior when animation

vtunr
Associate III

Hi,

I'm working with TouchGFX with STM32F746BG, and I have an issue when there is animation.

You can find a video of the problem here : https://youtu.be/X-D-NkGCN5k

I also have the same issue when I add an animation between screen.

At the beginning I was working without TouchGFX (and without external ram), playing with LTDC layer, moving and everything and I no issue.

Any idea where this could come from ?

Tony

EDIT: Updated video to the right one

1 ACCEPTED SOLUTION

Accepted Solutions
vtunr
Associate III

Switched to 16bits, working fine now.

Also some improvements come from :

  • Putting framebuffer in different memory bank
  • For 24 bit, setting 832 pixel wide

They are explained : https://www.st.com/content/ccc/resource/technical/document/application_note/group0/25/ca/f9/b4/ae/fc/4e/1e/DM00287603/files/DM00287603.pdf/jcr:content/translations/en.DM00287603.pdf (4.5.2, 4.5.3)

View solution in original post

13 REPLIES 13
Martin KJELDSEN
Chief III

I'm getting a video that shows you trying to drag a slider. Is that the right video? I can't tell anything is wrong other than there is no touch registered. Does touch work generally for your board?

/Martin

Sorry, yesterday I posted the wrong video, updated it this morning, but kept the thumbnail from yesterday, here's the link again : https://youtu.be/X-D-NkGCN5k

How did you create this project? Through designer or CubeMX?

/Martin

Through CubeMX.

Tony

Try creating a project with the Designer based on F746G-DISCO and compare the LTDC settings. You have access to an .ioc file in the latest version of the template.

/Martin

CubeMX does not really consider the best settings for TouchGFX just because it's enabled.

@Martin KJELDSEN​ So I checked again LTDC with the screen settings, and I didn't find any issue.

Our screen is different so I can't just copy LTDC settings. I took the STM32F7DMA.cpp and the STM32F7HAL.cpp from the touchGFX generated project, but still the same issue.

Though, I remove TouchGFX, kept GRAPHICS_HW_Init(), and played with moving the layer, and I have no issue, as you can see here https://youtu.be/AstKoKqB1Pc. The small layer is pointing on external SDRAM.

Code is :

  GRAPHICS_HW_Init();
 
  double x_offset = 10;
  double y_offset = 10;
  double vx = 0.1;
  double vy = 0.1;
  for(;;)
  {
  		if (x_offset <= 0 || x_offset + SIZE >= DISPLAY_WIDTH)
  			vx = -vx;
  		if (y_offset <= 0 || y_offset + SIZE >= DISPLAY_HEIGHT)
  			vy = -vy;
  		x_offset += vx;
  		y_offset += vy;
  		LTDC_Layer1->WHPCR = ACTIVE_AREA_START_X + SIZE + (int)x_offset - 1<< LTDC_LxWHPCR_WHSPPOS_Pos | ACTIVE_AREA_START_X + (int)x_offset << LTDC_LxWHPCR_WHSTPOS_Pos;
  		LTDC_Layer1->WVPCR = ACTIVE_AREA_START_Y + SIZE + (int)y_offset - 1<< LTDC_LxWVPCR_WVSPPOS_Pos | ACTIVE_AREA_START_Y + (int)y_offset << LTDC_LxWVPCR_WVSTPOS_Pos;
  		LTDC->SRCR = LTDC_SRCR_VBR;                      // reload shadow registers on vertical blanking period
  		while ((LTDC->CDSR & LTDC_CDSR_VSYNCS) == 0)     // wait for next frame
  			;
  		while ((LTDC->CDSR & LTDC_CDSR_VSYNCS) == 1)
  			;
  }

So right now, I don't really understand where this could come from. Any help would be welcome :)

Tony

Hi @vtunr​,

Just getting back to the community after a few weeks. Just to get it right - By simply adjusting the layer configuration as you've done here you're able to display something on your display, but not through TouchGFX?

/Martin

So, if I don't use TouchGFX, and DMA2D, just two layer that i move by myself, I don't have animation issue, so from this I concluded that my LTDC configuration is not the problem.

I tried several other things, and I saw two improvements by doing those two things, but it just reduce the issue, it's still there :

* Removing the second layer in LTDC that was never used

* hal.lockDMAToFrontPorch(false); to true

I tried the DMA2D files from the STM32F746BG discovery board, no changes, and I check my FMC configuration, and it seems to be alright.

I can upload a video this afternoon with the current behavior.