cancel
Showing results for 
Search instead for 
Did you mean: 

Touch GFX dynamic Graph widget crash the application

IB.1
Associate III

Hello Touch GFX Guys.

Hardware: STM32H7B3I development board

Software: Touch GFX designer 4.16

STM Cube IDE 1.5.0

We are trying to experiment with "dynamic graph" widget and experiencing some problems .

After adding widget on the screen follow code is generated

    dataGraph1.setScale(1);
    dataGraph1.setPosition(10, 10, 380, 180);
    dataGraph1.setGraphAreaMargin(0, 0, 0, 0);
    dataGraph1.setGraphAreaPadding(0, 0, 0, 0);
    dataGraph1.setGraphRangeY(0, 100);
 
    dataGraph1Line1.setScale(1);
    dataGraph1Line1Painter.setColor(touchgfx::Color::getColorFrom24BitRGB(20, 151, 197));
    dataGraph1Line1.setPainter(dataGraph1Line1Painter);
    dataGraph1Line1.setLineWidth(2);
    dataGraph1.addGraphElement(dataGraph1Line1);
 
    dataGraph1.addDataPoint(6.40222585735995f);
  ........
    dataGraph1.addDataPoint(15.6299816028386f);
    dataGraph1.addDataPoint(9.83211034085783f);
    dataGraph1.addDataPoint(10.0465691581937f);

Once we run the application code is crushing. if we comment

dataGraph1.addGraphElement(dataGraph1Line1);

and all follow lines:

dataGraph1.addDataPoint(9.83211034085783f);

application is running but obviously no graph :)

We do not have any functions in the code to update graph yet...

We tried to set in CANVAS BUFFER "Overwrite default buffer size " to 7200 bytes

but no luck.

Please advise if anything else we can do to overcome this problem, or any other information we can provide.

Thank you for all your help and support

Regards,

i

20 REPLIES 20

Hello IB.1,

I finally got my hands on a H7B3-DK board and I don't see any issue with the graph.

Here is what I did :

  • Open TouchGFX Designer 4.16, select H7B3-DK and the Dynamic Graph UI example
  • Generate code
  • Run target -> works perfectly
  • Then open project with CubeIDE 1.5.0, build, download and debug -> works also perfectly

Please try these steps with your board to see if it works. Also I suggest you to compare this project with yours and see what differs and why.

/Alexandre

IB.1
Associate III

Hi Alexandre,

I have checked example and it works.

let me see what is difference between example project and mine.

Thank you,

i

IB.1
Associate III

Hi Alexandre,

Thank you for your suggestion. We did try it and works...

When compare Touch GFX code to mine we noticed fundamental difference:

in CubeMX -> TouchGFX configuration, see screenshot bellow for the reference

in application generated by touchGFX "buffer location" is selected "By Allocation"

What we are doing: selecting "By address", also address setting what we are using are in screenshot.

we have configure SDRAM following this tutorial:

https://www.youtube.com/watch?v=XnSg3UJfSFc

if (in our code) switch in cubeMX TouchGFX Configuration buffer location to "by allocation" we can see the graph;

but if we use "by address" application crashed.

Please advise,

Thank you,

I

0693W000007C5GQQA0.jpg 

Hello IB.1,

The difference between your project and the one generated by TouchGFX is that the Application Template uses the internal RAM for the framebuffers.

Usually

  • If you use internal RAM for framebuffers -> By allocation (the linker will put the framebuffers wherever he wants following the rules you set in the linker file)
  • If you use external RAM for framebuffers -> By address (you arbitrarily specify the location of the framebuffers)

But if I understand correctly you are using the external RAM so by address should be fine. But maybe when you select by Allocation it allocates the framebuffers in Internal RAM which makes it work with a graph. Could you enclose your linker file ?

If by using the external RAM, By address does not work, I suspect your RAM config to be a bit off. Graph is using a canvas buffer that is allocated in the RAM. Maybe there's some conflict but that's just a guess.

/Alexandre

IB.1
Associate III

Hi Alexandre,

Thank you for your reply. Please find attached linker file. I did modify linker file to include "framebuffer section". Apparently it still crashing with or without modification.

Please note that I have to change file extension from "ld" to "txt" to keep forum happy.

Please advise

Thank you for all your help and support.

I.

IB.1
Associate III

Hi Alexandre,

Did you have a chance to look at the issue.

please advise at your earliest convenience.

Thank you,

I

Hello @IB.1​ ,

Yes I've looked at the issue and I personally don't find anything wrong with your loader file. Unfortunately, I haven't found the root of your problem yet. I'm in discussion with the dev team but this takes more time than expected.

Sorry for the inconvenience.

/Alexandre

IB.1
Associate III

Hi Alexandre,

Thank you for your replay. please keep us posted

Thank you for all your help and support

Regards,

I

IB.1
Associate III

Hi Alexandre,

Can you please advise, what is status of this request?

Thank you,

I

IB.1
Associate III

Hi Alexandre,

Can you please advise, what is status of this request?

Thank you,

I