cancel
Showing results for 
Search instead for 
Did you mean: 

Is high speed waveform display feature possible in TouchGFX?

canbu22
Associate III

Is there a template or a sample application that one can use to develop fast running waveform display feature in TouchGFX? (such as that of a oscilloscope waveform display and not a static or slow speed 1-dim graph display)

if not any suggestions? ..thanks..

26 REPLIES 26

No problem! :)

LalalandAudio
Associate II

Yes, this is something I need as well , have there been any developments on this ?

In fact I need the STM exclusively to show various audio . Scopes, waveforms analysers etc.

Did you try it and see if it suits your needs? There's a graph application example somewhere in this thread.

/Martin

I dont have the Eval board yet so I cannot test it , simulator will not run it and obviously it would have no input.

BO55
Associate

Any chance the example can be updated to TouchGFX Designer 4.13.0?

I'm Using STM32CubeIDE and it would be very nice to have a graph that runs on a Discovery Board.

Hi @Martin KJELDSEN​ 

Is this GraphApplication also working with TouchGFX 4.12.3 or 4.13.0?

Regards

Dejan

IB.1
Associate III

Hello @Martin KJELDSEN​ 

we are trying to port example what you posted a year ago to the current development environment:

Hardware STM32F746 Discovery board

Software: STM32 Cube IDE 1.3.0

Touch GFX 4.13.0

What we done so far:

  1. copy and paste

abstartcGraph. cpp/hpp

Graph.cpp/hpp

GraphLine. cpp/hpp

to:

touchGFX\gui\include\gui\common\ <header Files>

and

touchGFX\gui\src\common\ <Source Files>

2. Create simple touch GFX screen with background image from the example (I am referring here to the example what you share a year ago )

3. Code compiles and runs fine ie we can see background image on the screen

4. As soon as we add "Graph" variable in <ScrrenName>View.hpp file application compiles fine but once we try to run, application halts and we see "garbage" on the screen

#ifndef VC1VIEW_HPP
#define VC1VIEW_HPP
 
#include <gui_generated/vc1_screen/VC1ViewBase.hpp>
#include <gui/vc1_screen/VC1Presenter.hpp>
#include <gui/common/Graph.hpp>
 
class VC1View : public VC1ViewBase
{
public:
    VC1View();
    virtual ~VC1View() {}
    virtual void setupScreen();
    virtual void tearDownScreen();
    virtual void handleTickEvent();
protected:
    int tickCounter;
    Graph graph;			// this line makes application crash 
};
 
#endif // VC1VIEW_HPP

Any word of advise how to address that or if there is chance to get newer example? Please advise at your earliest convince.

Thank you for your support...

Regards,

IB

The Graph requires a canvas buffer. Verify that you've set one. I think it's done in main.cpp in that example i posted.

/Martin

IB.1
Associate III

Hi @Martin KJELDSEN​ 

Thank you for your reply. We have modify TouchGFXConfiguration.cpp file by adding follow code to the touch_gfx_init() function

void touchgfx_init()
{
  Bitmap::registerBitmapDatabase(BitmapDatabase::getInstance(), BitmapDatabase::getInstanceSize());
  TypedText::registerTexts(&texts);
  Texts::setLanguage(0);
 
  FontManager::setFontProvider(&fontProvider);
 
  FrontendHeap& heap = FrontendHeap::getInstance();
  (void)heap; // we need to obtain the reference above to initialize the frontend heap.
 
  hal.initialize();
 
	#define CANVAS_BUFFER_SIZE (3600)
   static uint8_t canvasBuffer[CANVAS_BUFFER_SIZE];
   CanvasWidgetRenderer::setupBuffer(canvasBuffer, CANVAS_BUFFER_SIZE);
 
}

But it seems it didnt really helped. as soon as we enable:

Graph graph;

application crashes. Can you please advise if there is/are anything else we should look at.

Thank you for all your support.

Regards,

IB

Please beware that you're modifying a file in the "generated/" folder which will get overwritten if you should generate code from CubeMX again.

That being said, are you debugging? What's the application doing when it crashes?

/Martin