Skip to main content
Wrend.1
Associate III
September 20, 2020
Solved

[TouchGFX]The effect of "change screen" function in PC simulation and development board is not consistent

  • September 20, 2020
  • 1 reply
  • 991 views

I add a function like "application().gotoScreen_startScreenSlideTransitionWest();"

It works well in PC​ simulation,but it works in real board like the "application().gotoScreen_startScreenNoTransition".

Maybe it need some setup to make it works in ​development board.

So what should i do.

This topic has been closed for replies.
Best answer by Romain DIELEMAN

Well that depends on your setup. Your framebuffer start address is set at 0xc0000000 and you have a double framebuffer enabled. The size of a framebuffer is: height*width*bpp, so I suppose that your framebuffer is of 119400 byte. If your ram is big enough i would recommend to set the animation storage at 0xc0232801 (so that you have enough space for the second framebuffer: 119400 bytes * 2 = 23 2800 bytes).

/Romain

1 reply

Romain DIELEMAN
ST Employee
September 21, 2020

Hi,

What board are you using? For some of the complex animations like slide transition you need to enable the animation storage in TouchGFXHAL.cpp in the function initialize function by calling and modifying the function setframeBufferStartAddresses(). This function takes first the address of the framebuffer (look at the function in TouchGFXgeneratedHal if you don't know it), then the address of the second framebuffer (can be set to 0 if you do not want double buffer), and then the address of the animation storage. This is set to 0 initially, you need to set it to a free space in your RAM.

So you should have something like this:

void TouchGFX::HALinitialze()
{
 TouchGFXGeneratedHAL::initialized();
 setFrameBufferStartAddresses((void*)frameBuf, (void*)0, (void*)frameBuf + sizeFrameBuf);
 ...
 
}

/Romain

Wrend.1
Wrend.1Author
Associate III
September 22, 2020

Thanks!

I find it in my code. It looks like blow.

setFrameBufferStartAddresses((void*)0xc0000000, (void*)0xc0119400, (void*)0);

So,how to calc​ the right value I need.

I mean how to know the ​"frameBuf" and "sizeFrameBuf".

Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee
September 22, 2020

Well that depends on your setup. Your framebuffer start address is set at 0xc0000000 and you have a double framebuffer enabled. The size of a framebuffer is: height*width*bpp, so I suppose that your framebuffer is of 119400 byte. If your ram is big enough i would recommend to set the animation storage at 0xc0232801 (so that you have enough space for the second framebuffer: 119400 bytes * 2 = 23 2800 bytes).

/Romain