cancel
Showing results for 
Search instead for 
Did you mean: 

Single Buffer Strategy

scottSD
Senior III
 
4 REPLIES 4
Yoann KLEIN
ST Employee

Hello @scottSD​ ,

Is this post a mistake ? Or did you just forgot to add a description ?

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX
scottSD
Senior III

@Yoann KLEIN​ 

Sorry, I was interrupted and didn't get back to this. Yes, I do have a question about it.

If we select "Single Buffer" in Framebuffer Strategy in the TouchGFX section of CubeMX, do we still need to manually register the TaskDelayFunction() and call setFrameRefreshStrategy(REFRESH_STRATEGY_OPTIM_SINGLE_BUFFER_TFT_CTRL) ?

I am using Stm32CubeIDE v 1.17 and TouchGFX v4.17.

I am seeing some performance issues on one of my designs that is using a Single buffer because the TFT has a command interface instead of using the TFT.

scottSD
Senior III

I have implemented this as discussed in the comment headers for setFrameRefreshStrategy().

I confirmed this by calling getFrameRefreshStrategy().

The comments indicate that taskDelay() will be used when the buffer strategy REFRESH_STRATEGY_OPTIM_SINGLE_BUFFER_TFT_CTRL has been setup.

However, when I put a breakpoint in taskDelay() during debug, it never goes to that function.

Am I doing something wrong?

scottSD
Senior III

One of the things I am seeing is that the method TouchGFXHAL::flushFrameBuffer() is called more than it needs to be per frame, which is causing us issues. I found that if AbstractShape::updateAngle() is called often, the following code is causing more flushes of the frame buffer than it should be:

      Rect rectBefore = getMinimalRect();

      invalidateRect(rectBefore);

      shapeAngle = angleQ5;

      updateAbstractShapeCache();

      Rect rectAfter = getMinimalRect();

      invalidateRect(rectAfter);

It was my understanding that invalidates are queued up and draws and flushes of the framebuffer would only happen on a tick. Is this not the case?

I am seeing multiple flushes per tick (as in sometimes 3). This causes adverse screen rendering (tearing on the screen).