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
IB.1
Associate III

Hi @Martin KJELDSEN​ 

Thank you for reply.

Very good point on modifying "generated" files, at this point I just want to get it running.

here the screen shot from debugger when application ""crashed"

0693W000000VoZmQAK.jpg

Tracing it back:

0693W000000VoZwQAK.jpg

0693W000000Voa6QAC.jpg

0693W000000VoaGQAS.jpg

0693W000000VoaQQAS.jpg

While was typing I was thinking should I place any canvases or any other "UI elements" on screen while generating tuch GFX project?

Anything else I can provide you with? Please advise...

Thank you for all the support

Regards,

IB

Hi

Did you adapt the painter to your system?

I had a similar behaviour and then I changed from PainterRGB565 to PainterRGB888 in Graph.hpp.

It depends on your TouchGFX settings which painter class to use.

Regards

Dejan

This is also a very good point. The LCD class will assert if the format is not correct. People tend to copy the Graph from project to project without considering the pixel format.

/Martin

IB.1
Associate III

Hi @Martin KJELDSEN​ @Dejan Nedeljkovic​ 

This is definitely helps and I can see simple graph on the screen... Thank you for all your help.

Question what I have, how would you recommend to declare frame buffer without modifying "generated" files (TouchGFXConfiguration.cpp)

ie

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);		
}

Thank you very much for all your help and support.

Regards,

IB

You can set the canvas buffer size in TouchGFX.

Select the Screen where your graph should be drawn and then you can set the canvas buffer to another value:

0693W000000Vs9xQAC.png

You can also write any code you want inside TouchGFXHAL.cpp (it inherits from HAL and also has initialize() )

IB.1
Associate III

Thank you Gentlemen for all your Help