cancel
Showing results for 
Search instead for 
Did you mean: 

Acquisition rate optimization for STM32cubeMonitor (10kHz)

ikellymo
Associate

Hi, I'm using a Nucleo-F072RB at the moment and would like to use the STM32cubeMonitor tool to visualize a few signals at 1-10kHz. Right now I am only able to read at about 5Hz update, which seems very slow. I noticed a section on the wiki for speed optimization, but access is blocked.

Could someone offer advice for increasing the acquisition rate?

BTW, I really like the idea of this tool if it can become more oscilloscope-like!

1 ACCEPTED SOLUTION

Accepted Solutions
PDEFO.1
ST Employee

​Hello,

A new wiki page is available https://wiki.st.com/stm32mcu/wiki/STM32CubeMonitor:How_to_optimize_acquisition_speed.

Hope it will help.

Best Regards

Philippe

View solution in original post

4 REPLIES 4
stephane.legargeant
ST Employee

Hello

Indeed, 5Hz seems very low : The time to read 1 variable is usually around 1 and 2 ms, so for one variable it is possible to reach more than 500Hz.

Some advises :

  • Set the jtag / swd speed to default or higher frequency
  • Limit the number of variables, and if possible, group it in the same area in memory.
  • Set the sampling frequency to "sequential loop"

The snapshot mode may provide better speed and regularity for acquisition, but need to add code on the target.

Best regards

ikellymo
Associate

Thank you, Stephane.

  • This is on Nucleo-F072RB
  • I am using the built-in ST-Link v2-1B (...62811):SWD at 4.6MHz both for "My probe out" and "my probe in"
  • I have 4 variables selected, not necessarily grouped in memory
  • I am using sequential loop / direct.

Is there a faster ST link? Any additional settings to check?

I don't mind adding code to the target but I'd like to quickly understand the limits of Monitor to know if it can fulfill my application needs or not. Can target mode send a time-series array back? For example, send 100 values every 1ms?

Hello

  • With your configuration and 4 variables, I would expect a read frequency between 50Hz and 100Hz.

  • The ST-Link V3 can support faster connection to target, but it will not change a lot the monitoring performances.

  • When the code is instrumented with snapshot code, it is possible to read more quickly, but it may be limited to 2000 data per seconds.

So it is not possible to reach the target of 100 values every 1ms with STM32CubeMonitor and the ST-Link.

Best regards

Stephane

PDEFO.1
ST Employee

​Hello,

A new wiki page is available https://wiki.st.com/stm32mcu/wiki/STM32CubeMonitor:How_to_optimize_acquisition_speed.

Hope it will help.

Best Regards

Philippe