Skip to main content
Visitor II
December 22, 2021
Solved

Irregular sampling of CubeMonitor

  • December 22, 2021
  • 1 reply
  • 1275 views

Hi everyone,

I need to monitor the amount of 2 variables in the 2 STm32 Nucleo board.

I could do that but I have 2 problems.

  1. the sampling of each probe is not regular. Cube monitor makes it for example in the time 1, 3, 4, 8, 10, .. ms. I need to monitor data every 2 or 3 ms and regular.

0693W00000HpXKOQA3.png 

2.The sampling times of prob1 and probe2 are not same. Hier for Example it has done it for blue one in 3.689s and for other one in 3.691s.

0693W00000HpXIhQAN.png0693W00000HpXIrQAN.pngCould you please help ?

    This topic has been closed for replies.
    Best answer by stephane.legargeant

    Hello Nmo.1

    The sampling of data is triggered by the computer OS, so the timing depends of what the computer is doing. In order to have more regular acquisition, try to close all the other apps, but it may not improve a lot for ms scale.

    If you want very accurate sampling, you can use the "snapshot mode". The STM32 code must be instrumented, but it will allow to take a "snapshot" of the data at an accurate timing defined by the microcontroller.

    STM32CubeMonitor:How to perform an acquisition in snapshot mode - stm32mcu

    For the acquisition with 2 probes, the value is read on one probe first, and then on the second one. So it is nearly impossible to have the same time for the point.

    Best regards

    Stephane

    1 reply

    ST Employee
    December 22, 2021

    Hello Nmo.1

    The sampling of data is triggered by the computer OS, so the timing depends of what the computer is doing. In order to have more regular acquisition, try to close all the other apps, but it may not improve a lot for ms scale.

    If you want very accurate sampling, you can use the "snapshot mode". The STM32 code must be instrumented, but it will allow to take a "snapshot" of the data at an accurate timing defined by the microcontroller.

    STM32CubeMonitor:How to perform an acquisition in snapshot mode - stm32mcu

    For the acquisition with 2 probes, the value is read on one probe first, and then on the second one. So it is nearly impossible to have the same time for the point.

    Best regards

    Stephane

    Nmo.1Author
    Visitor II
    December 22, 2021

    Thank you so much.