cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-H743ZI2, Sampling low frequency signal with high ADC sampling rate causes gaps, glitches.

JJ.5
Associate III

Hello,

I'm currently using the ADC on the NUCLEO-H743ZI2 board to sample a low frequency sine wave signal.

The ADC is configured to DMA, circular buffer, continuous sampling mode and oversampling ratio of 4 with 2 bits shift.

When I set the ADC sampling rate to 250KHz and the sine wave signal is 100Hz.

Here is the sampled signal I got:

JJ5_0-1687644290255.png

 

When I reduced the ADC sampling rate to 125KHz, the sampled data is correct:

JJ5_1-1687644471198.png

Does anyone know what's causing this?

Do I have to reduce the sampling rate?

 

13 REPLIES 13

I believe it has STlinkV3.

I can try to use it intead of USB FS.

Thanks!

LCE
Principal

With 32 bit x 300k you're at 9.6 Mbit/s, that is quite close to the limit and means that your buffering and transfer scheme has to be on point. I don't know how close to the 12 Mbit/s you can really get.

Anyway, starting with transmitting data only, see it that gets through, keep the callbacks simpler.
Even a x * 100 MHz MCU needs some time for the calculations and data transfers that you put into the callbacks.

You might want to measure processing time of these functions with the cycle counter.

JJ.5
Associate III

I believe you are correct.

The actual transfer speed is around 7Mbit/s to 8Mbit/s.

Thanks a lot!

I assumed the actual rate is the same on the datasheet, but it's not.:sad_but_relieved_face:

LCE
Principal

You are probably hitting the USB FS transfer capability limit.

That was @waclawek.jan idea, so you should mark his reply as the solution.

I assumed the actual rate is the same on the datasheet, but it's not.

Welcome to the real world... 😉