cancel
Showing results for 
Search instead for 
Did you mean: 

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

Wrend.1
Senior

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

4 REPLIES 4
Romain DIELEMAN
ST Employee

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

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".

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

OK,I try to ​expand the framebuffer, and finally, it works.

The setup in my code like blow.

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

Thanks very much.:*