cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32H7] Spi Impact On Adc Module(brings larger noise)

THuan.5
Associate

When we test adc small signals, we found all spi have impact on adc1 and adc2 module, which leads unexpect singals even we use fund HDs of it.

Detals as below:

--Environment:Save 6400 points at different conditions,

1. spi2 or spi4 work and really has impact on adc(somtimes happen, expecially large data trans)

2. Spi2 or spi4 work but not impact on adc

--Signal meaning:

  Red -->> spi2 or spi4 work and really has impact on adc

Blue -->>Spi2 or spi4 work but not impact on adc

--Feature1: frequency and time base analysis of 6400 points

 0693W00000UndfGQAR.png--Feature2: time base compare of 6400 points

 0693W00000UndfLQAR.png--My opinion:when spi transfer data, spi will impact all adc, brings larger noise at relative longer time. This means larger energy(uniform at all frequency spec.) at certain time. So even we use fft to get fund HDs of this signal, we also can not filter the noise.

--My expect result:1.the reason spi impact adc module, 2.any methos to avoid it, 3.will all spi impact all adc?

7 REPLIES 7
Amel NASRI
ST Employee

Hi @THuan.5​ ,

  1. No known limitation on STM32H7 that confirms a possible limitation on ADC accuracy.
  2. It will be helpful if you can precise the exactly used STM32H7 device. You can also refer to its errata sheet to check if you are facing some known limitations.
  3. Do you confirm that ADC works properly when SPIs are not used?
  4. Can you share a minimum coed that helps to reproduce the issue?

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Dear Amel,

Thanks very much for reply.

For reply1

We use STM32H730 VBTx package.

For reply2

No, errata sheet still not carefully fefer to find the limitations. But currently we do a lot of test to confirm the issue. For example:

1)use different spi and adc(same port and different port situations all cover), not work

2)connect suffix_c pin to ground, not work

3)use external adc reference and external power source to supply MCU, not work

4)connect all adc pin to ground, not work

5)physically cut down spi pin, not work

6)and so on...what we can think out

For reply3

yes, adc works properly when spi not use, the noise happen(not every time) when spi use at high frequency

For reply4

I think this issue can be reproduce by simply configure the cubemx for adc and spi, this issue we find in our different hal configure and different hardware platform.

Robmar
Senior III

Our project is also suffering noise pickup on both ADCs from the SPI activity, although vref has all the filtering capacitors fitted. Improving the power supply helped, but it still threatens abandoning STM if there isn't a viable solution.

S.Ma
Principal

Have you tried reducing the SPEED GPIO parameter for the SPI MOSI and SCK pins ?

I´ll check, I think it was set by the MX configurator so I'd guess its at the lowest frequency, but worth a check, thxs.

Robmar
Senior III

Speed of GPIO made no difference, the SPI activity and connected device seem to just use more power and this impacts the supply rail noise. More VCC filtering I guess.

LCE
Principal

The STM32 12-bit ADC is not a sigma-delta converter with oversampling and filtering, so depending on the ADC's analog input filter, power supply decoupling and filtering, and PCB layout, you might get lots of noise, even picked up by a 12 bit ADC.

Especially with some ADC inputs on the Nucleo boards, which have kinda wild PCB routing, due to serving many purposes.

SPI data line is a good example for noise source, you could test that by sending constant data patterns. Zeros or 1s only, or a fixed pattern continously, which you then might see as a fixed frequency in the ADC signal.