Skip to main content
VKost.3
Associate III
Apr 20, 2021 5:13 AM UTC
Question

Slide screen transition problem

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.

11 replies

Romain DIELEMAN
ST Employee
Apr 20, 2021 6:42 AM UTC

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
Apr 20, 2021 7:32 AM UTC

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
Apr 20, 2021 11:31 AM UTC

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
Apr 21, 2021 4:53 AM UTC

#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
Super User
Apr 21, 2021 11:00 AM UTC

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

VKost.3
VKost.3Author
Associate III
Apr 21, 2021 11:28 AM UTC

I use FMS+freertos, buffer is in RAM

MM..1
Super User
Apr 21, 2021 12:36 PM UTC

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
Nov 2, 2021 7:18 AM UTC

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.