2024-09-27 04:00 AM
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.
2024-09-30 04:40 AM
Yes, I did plot the logged data, and it confirms that the issue I’m reporting—specifically the inconsistent peaks and the overall shape not meeting expectations—persists. The logged data shows the expected peaks, but when rendered in the dynamic graph, these discrepancies appear.
2024-09-30 04:46 AM
Thank you for the extra information.
Could you share a set of data that creates the issue so I can try to reproduce it.
The issue happens only on the bottom graph?
Not on the 1st, 2nd or 3rd graph?
If so, what happens when you try to plot the data from the dataset that creates the issue on graph 1, 2 or 3?
Regards,
2024-09-30 05:09 AM
The issue happens across all 13 dynamic graphs, not just the bottom one. So, it’s not limited to a particular graph or position.
I’m using a UART ECG module to receive data, and I think it might be a timing issue. When I plot broader waves like square or sine waves, they appear smooth. But as the frequency increases, the shape of the waves starts to change, leading to the same inconsistent peaks and distorted waveforms.
2024-09-30 06:05 AM
Do you have a picture of this behavior?
When you increase the frequency what do you do?
Regards,
2024-09-30 07:47 AM
Now maybe i understand your issue. Seems class graph have some missconfig scale or x visible range values. Then some added plot can be skipped... Too you dont show how and where you addpoints from queue. Show your code parts and check X ranges point count...
2024-10-03 08:53 PM
Hi Gaetan,
What I did was fetch the data every 4ms and plotted it on the display at the same rate.
Let me know if you'd like more details or if there are any adjustments you recommend!
2024-10-04 12:53 AM
Hello @smj-11 ,
Could you share with us a data set that creates the issue so that I can try to test that dataset and try to reproduce the issue.
As far as I know, I am not aware of limitation on the dynamic graph widget, but I will investigate.
Could you also share the settings used for your dynamic graphs widgets (the side bar on the right) so I can check that everything is fine with your settings.
Finally, I want to double check how you managed your display. You say it refreshes every 4ms right?
So if you add a handleTickEvent function, it will be called 250 times per seconds right? Can you check that?
Regards,
2024-10-04 01:03 AM
50 Hz is 20 milliseconds
So 5 groups of samples scrolled in per screen refresh.
Gonna need to find some sharper cats to work on this..
2024-10-04 02:31 AM