cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Graph Widget, how to make best performance

Breeze1
Associate III

Now, using Dynamic Graph Widget in Touch 4.15. We only draw 4 lines, but somtimes picture does not smooth.It looks like it blocked somewhere, button action is delayed. At last we find render time become biger as line draws more. hoping for some help to make performance better.

here is our trys:

  1. canvas buffer , I tried most large like 750KB, it won't help.
  2. mcu clock rate, make faster do help.but for battery reason, can't
  3. double fram buffer, looks like no help

0693W00000AO7F6QAL.jpg 

0693W00000AO7G9QAL.png

1 ACCEPTED SOLUTION

Accepted Solutions
Romain DIELEMAN
ST Employee

Hi,

The line elements rely heavily on the MCU for rendering, so it might be difficult to overcome hardware limitations. Which Dynamic Behavior are you using ? "Wrap and Clear" would be the least demanding one. When you run the simulator, press F2 to see what parts of the display are being updated. This might help you see if you are not invalidating something that is not necessary.

I dont know if it will help that much but if you have enough space you could try to also enable the animation storage in addition to the double framebuffer. You need to manually do this in user code in the setFrameBufferStartAddresses() function in TouchGFXHAL.cpp in the initialize function:

void TouchGFXHAL::initialize()
{
    // Calling parent implementation of initialize().
    //
    // To overwrite the generated implementation, omit call to parent function
    // and implemented needed functionality here.
    // Please note, HAL::initialize() must be called to initialize the framework.
 
    TouchGFXGeneratedHAL::initialize();
 
    setFrameBufferStartAddresses((void*)firstFrameBufferAddress, (void*)(firstFrameBufferAddress+ sizeFrameBuffer), (void*)(firstFrameBufferAddress+ 2 * sizeFrameBuffer));
}

/Romain

View solution in original post

4 REPLIES 4
Romain DIELEMAN
ST Employee

Hi,

The line elements rely heavily on the MCU for rendering, so it might be difficult to overcome hardware limitations. Which Dynamic Behavior are you using ? "Wrap and Clear" would be the least demanding one. When you run the simulator, press F2 to see what parts of the display are being updated. This might help you see if you are not invalidating something that is not necessary.

I dont know if it will help that much but if you have enough space you could try to also enable the animation storage in addition to the double framebuffer. You need to manually do this in user code in the setFrameBufferStartAddresses() function in TouchGFXHAL.cpp in the initialize function:

void TouchGFXHAL::initialize()
{
    // Calling parent implementation of initialize().
    //
    // To overwrite the generated implementation, omit call to parent function
    // and implemented needed functionality here.
    // Please note, HAL::initialize() must be called to initialize the framework.
 
    TouchGFXGeneratedHAL::initialize();
 
    setFrameBufferStartAddresses((void*)firstFrameBufferAddress, (void*)(firstFrameBufferAddress+ sizeFrameBuffer), (void*)(firstFrameBufferAddress+ 2 * sizeFrameBuffer));
}

/Romain

Thanks for your help.

1.I am using "Wrap and Clear" .

2.I tried enable the animation storage, looks like no help.

I tried to resize datapoint from 400 to 200, much better. Thanks again for you help

BParh.1
Senior III

Interesting topics...

What is your color depth? Would reducing it help and acceptable?

16bit, RGB565. not acceptable