cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with 12-Lead ECG Waveform Plotting and GUI Implementation on STM32

smj-11
Associate II

Dear STMicroelectronics Support Team,

I am currently working on a project using an STM32 microcontroller where I need to display a 12-lead ECG waveform. The display layout is configured in a 3x4 grid format, along with an R-1 waveform shrink. I have implemented an RTOS for managing the GUI rendering and data handling efficiently.

For the GUI, I am using the TouchGFX framework and have integrated dynamic graphs to plot the 12-lead ECG waveforms in real-time. The ECG module communicates with the STM32 via UART using interrupts to handle data reception.

However, I am facing issues with accurately plotting the ECG waveforms on the screen. The waveform representation seems to shrink or misalign, particularly in the R-1 section. Despite configuring tasks with adequate priorities and stack sizes for the GUI and ECG data, and ensuring the refresh rate is set to 4 ms, I am unable to achieve a stable display.

Could you please provide guidance on optimizing the dynamic graph display using TouchGFX or recommend any specific configurations in the STM32 settings that could resolve this issue? Any advice on fine-tuning the integration between the RTOS, UART, and TouchGFX would also be highly appreciated.

Your support and insights would be greatly valued.

Thank you.

4 REPLIES 4
GaetanGodart
ST Employee

Hello @smj-11 ,

 

When you say R-1, do you mean R1 or "R minus 1"?
From what I have seen, ECG goes from R1 to R5.
But I do not think that is relevant for the question, because in the end it is always just data being displayed.

 

Can you share with me what you expect to see and what you actually have?

Can you also share your project maybe?

 

You say "refresh rate is set to 4 ms", which refresh rate is that? The ECG Data?
Why is it 4ms?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

@GaetanGodart wrote:

You say "refresh rate is set to 4 ms", which refresh rate is that? The ECG Data?
Why is it 4ms?


Indeed.

A human heart rate isn't going to be over 220 beats per minute - so under 4 per second.

So a refresh rate of 4ms is going to be over 1000 "refreshes" (whatever they may be) per beat!

Seems a tad excessive?

 

https://en.wikipedia.org/wiki/Heart_rate#Maximum_heart_rate

Andrew Neil
Evangelist III

@smj-11 wrote:

The ECG module communicates with the STM32 via UART using interrupts to handle data reception.

However, I am facing issues with accurately plotting the ECG waveforms on the screen. The waveform representation seems to shrink or misalign


Are you sure that the display problems aren't down to problems in the comms link ... ?

ie, data is getting corrupted before reaching the display - and the display is accurately showing what it receives?

Ok but most TouchGFX screens refresh rate is 60 ticks per second so 16,6 ms.

I do not know what smj is using to display the framebuffer rendered by TouchGFX.

Gaetan Godart
Software engineer at ST (TouchGFX)