Skip to main content
VKost.3
Associate III
April 20, 2021
Question

Slide screen transition problem

  • April 20, 2021
  • 4 replies
  • 4166 views

I created two screens and did the actions to change the screen. But changing the screen does not work correctly.

Added an extra buffer for animation

uint16_t buf_ram [160*128];

using namespace touchgfx;

namespace {

  LOCATION_PRAGMA("TouchGFX_Framebuffer")

  uint32_t frameBuf[(160 * 128 * 2 + 3) / 4 * 2] LOCATION_ATTRIBUTE("TouchGFX_Framebuffer");

}

void TouchGFXGeneratedHAL::initialize()

{

  HAL::initialize();

  registerEventListener(*(Application::getInstance()));

  setFrameBufferStartAddresses((void*)frameBuf, (void*)(frameBuf + sizeof(frameBuf)/(sizeof(uint32_t)*2)), (void*)buf_ram);

}

This topic has been closed for replies.

4 replies

Romain DIELEMAN
ST Employee
April 20, 2021

Hi,

Are you facing the issues shown in the pictures only when you go from a screen to another ? Does that mean that you face no issues when staying on one screen and rotating elements (i have in mind the same animation as the UI template "Texture mapper example"), or with any other "complex" animations ?

/Romain

VKost.3
VKost.3Author
Associate III
April 20, 2021

Yes, I only come across during transitions! Animating scrollWil Tutorial 4: Creating a Scroll Wheel with Custom Behavior works well! Transition block works good. Transition Slide, Cover and Wipe works bad.

Romain DIELEMAN
ST Employee
April 20, 2021

How/why did you set the size and addresses of the framebuffers and animation storage to what you set ? I think you should enable more memory to the animation storage. I would do something more like this:

setFrameBufferStartAddresses((void*) addressFrambuffer1, (void*) addressFramebuffer1 + sizeFramebuffer, (void*) addressFramebuffer1 + 2 * (sizeFrameBuffer) );

where sizeFramebuffer = HEIGHT * WIDTH * bpp / 8, so in your case I guess just 160*128*16/8.

/Romain

VKost.3
VKost.3Author
Associate III
April 21, 2021

#include <TouchGFXGeneratedHAL.hpp>

#include <touchgfx/hal/OSWrappers.hpp>

#include <gui/common/FrontendHeap.hpp>

#include "stm32f7xx.h"

#define SIZE_FRAME_BUFFER (uint32_t) (128 * 160 * 16 / 8)

#define ADDRESS_FRAME_BUFFER (uint32_t) 0x20010000

using namespace touchgfx;

void TouchGFXGeneratedHAL::initialize()

{

  HAL::initialize();

  registerEventListener(*(Application::getInstance()));

  setFrameBufferStartAddresses((void*)ADDRESS_FRAME_BUFFER, (void*)(ADDRESS_FRAME_BUFFER + SIZE_FRAME_BUFFER), (void*)(ADDRESS_FRAME_BUFFER + (2*SIZE_FRAME_BUFFER)));

}

Screen replacement does not work. The screen does not change.

After the first call to application (). GotoScreen2ScreenBlockTransition (), the transition to the second screen does not occur and the handleTickEvent event stops working.

MM..1
Chief III
April 21, 2021

Maybe good is start from start. How method LCD you use? LTDC? FMC? SPI? ...

VKost.3
VKost.3Author
Associate III
April 21, 2021

I use FMS+freertos, buffer is in RAM

MM..1
Chief III
April 21, 2021

Fuller info is better , project from where ? CubeMX IDE TouchGFX? You select Custom driver and Double buffer by allocation?

When you change this you need delete target folder before generate new usw.

I recommend try same config from start with TouchGFX 4.13 compare result ...

FMS??

Gcfsd.1
Visitor II
November 2, 2021

Created a venture for the display of LTDS and the buffer is saved in the sdram. Everything works flawlessly with new page. Under the fms and the buffer within the ram does no longer paintings.