Page 1 of 1

ADC spikes on STM32F427 custom board

Posted: Fri Aug 05, 2016 10:54 pm
by Rick Burnett
I'm just not sure if I have everything setup properly. At first I checked a bunch of different analog inputs I have wired up and they all generate spikes (max value) even with ground applied.

Then I thought, let me check with the internal temperature sensor, it too is showing spikes.

I've used the reference circuit for the Vref+ from the F427 discovery board, and I've probed Vref+ and it looks clean (x10 probe). I also checked GND and VDD to make sure I am not seeing any noise, both clean.

The board has a vdd -12 plane below the chip, but I checked vdd -12 and it is clean as well (coming from a nice bench supply)

I went through in my code and made sure every input that is floating I set to a push-pull and set to 0 (trying to remove any possible noise I might be getting coupling through the analog mux.

Still, spikes remain.

Turned off SPI interface and removed my programmer and started without it, still generated the same spikes.

Tried a different CPU just to make sure, no change.

The ADC is reading at 480 which is the slowest. I also slowed down the CPU pretty far and it still was doing it. Also tried just setting reading ONE input through the conversion group, same thing.

At this point, I'm just not sure what else to check. I've looked through the errata that I could find from ST but not seeing anything talking about this problem.

EVERYTHING I read points to this being a noise problem on the board, just have no way of seeing the noise it seems. Reason I am asking here is if you've ever seen a setting I could have wrong that might be doing something wrong. Instead of pasting everything, if there is any specific information that would help. Most of the code is similar to the ADC demo.

RIck

Rick

Re: ADC spikes on STM32F427 custom board

Posted: Fri Aug 05, 2016 11:07 pm
by Giovanni
By spike you mean reading the maximum value? I have never seen that. I remember an errata regarding an ADC input, try change input channels an see if it persists. Also try measure hard GND and VDD (wiring without a resistor). Is power clean? RF interferences?

Giovanni

Re: ADC spikes on STM32F427 custom board

Posted: Fri Aug 05, 2016 11:22 pm
by Rick Burnett
Yep, maximum values, off of any analog source (meaning any of the analog pins as input or the temperature sensor).

I've checked all the power, the noise is pretty small, not seeing any sort of spikes.
Given it was common to every input I figured it had to be:

1) Power or Ground noise
2) +VREF noise
3) some possible analog input to the mux that is acting like a strong antenna.

I've used almost an identical setup with an stm32f429 board I made with same power source, buck converter, layout rules, so I was quite surprised. Just really bizarre.

Here's an image of the temperature sensor, you can see it spiking up.

http://www.dropbox.com/s/xbtgh3cza0riyrg/File%20Aug%2005%2C%206%2018%2042%20PM.jpeg

Re: ADC spikes on STM32F427 custom board

Posted: Fri Aug 05, 2016 11:50 pm
by Rick Burnett
Also note, the graphic I posted is with the resistor off for the temperature sensor (didn't know I had to turn that one). I noticed in the picture I set the spikes weren't exactly full level, now they are. No pattern I can see either. Sometimes they come close as you see, sometimes they are a bit sparser.

Re: ADC spikes on STM32F427 custom board

Posted: Fri Aug 05, 2016 11:59 pm
by Giovanni
Are you getting those spikes also as sampled values? for example, try to measure GND, do you get those spikes in samples?

It could be related to ADC activity but not affect the measurements. I would also try to ask on the ST forums about this.

Giovanni

Re: ADC spikes on STM32F427 custom board

Posted: Sat Aug 06, 2016 12:05 am
by Rick Burnett
Yes, I am getting those values as sampled values. One thing I notice is that I have the code setup to measure temperature but I am not seeing any value output with the resistor enabled, so that's interesting.

What you see is a DAC output that is mirroring the incoming values. To make sure it wasn't the SPI connectivity, I also sampled 10,000 values into memory and checked them (outputting over the gdb connection in semi-hosted mode) Same result.

In this case, I am not even sampling any inputs or outputs from pins, just the internal temperature voltage (unsuccessfully of course).

First step at this point is figure out why the temperature is not being detected! In any case, thanks for the suggestions. I will report back when I determine something positive! :)

Edit: Haha, AC coupling on the scope, temperature sensor working.

Re: ADC spikes on STM32F427 custom board

Posted: Sat Aug 06, 2016 6:51 am
by Rick Burnett
Mystery solved. My buck converter was causing the problem. Not sure why on this design it's such an issue, but I removed it and put in a linear 3.3V regulator and all the glitching is gone.

Also, I should have made my internal plane GND as well to just make a big shield. Right now it's +12V and that's the supply to the buck converter, which, gets some noise injected into it. Oops. :)