cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f4discovery odd ADC behaviour

ilya
Associate II
Posted on September 18, 2013 at 20:05

Hello guys, unfortunately I observe  very odd behavior with ADC on the Discovery board. In my hardware setup i have only a power supply to generate the voltage for ADC and I have soldered a 2.2nF capacitor on the input pin to minimize the interference. I reproduce this behavior also with ADC DMA example from stm32f4discovery firmware package. So I suppose there should not be a software problem. I observe high interference at ADC values 256, 512, 768, 1024 and so on, altogether 16 points. At these points my value jumps 256 values up and down. What is wrong?

Thank you in advance,

Ilya
5 REPLIES 5
Posted on September 18, 2013 at 21:53

What's the sample time in cycles?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ilya
Associate II
Posted on September 19, 2013 at 05:00

I have tested many samplings times, nothing is changing. Right now I have 3 cycles, as same as in the example. You can see the behaviour on the pictures i have attached. By the way this interference occures the most at 256*n (n=1..15) and at least at 256*n -128 (n=1..15) ADC values. In other words interference minima is between two maximas, but it occures everywhere!

Screenshots: 

https://www.dropbox.com/sh/g7htzu95x9n4vs0/6_p0odiWnF

ilya
Associate II
Posted on September 19, 2013 at 12:08

Does anybody have an idea?

Posted on September 19, 2013 at 12:46

Can you record the data in the processor independently of the Studio app? And is this error present there? ie DMA 1000 samples into an array, stop, review delta between samples.

Off by ~256 screams of byte level incoherency from asynch DMA and debug operations.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ilya
Associate II
Posted on September 20, 2013 at 14:15

Just did a first test and it looks good! Thank you!