cancel
Showing results for 
Search instead for 
Did you mean: 

ADC oversampling question with example

russ
Associate II
Posted on July 29, 2008 at 23:08

ADC oversampling question with example

5 REPLIES 5
russ
Associate II
Posted on May 17, 2011 at 12:40

What method would you suggest for performing ADC oversampling?

Is it possible to perform auto-injection sequences on the channels and then average them as I call the functions.

Example: Oversampling 4 channels, 4x oversampling

AutoInjection Sequence

ch4, ch4, ch4, ch4, ch3, ch3, ch3, ch3, ch2, ch2, ch2, ch2, ch1, ch1, ch1, ch1

The results would be transfered by DMA to an array.

Then the first 4 array locations are averaged, then the next 4, etc...

Is this a decent way to accomplish my task or should I just manually sample and average? I've already got DMA operational.

16-32micros
Associate III
Posted on May 17, 2011 at 12:40

Hi russ1,

This Application Note may be useful for your case :

AN2668 : ''Improving STM32F101xx and STM32F103xx ADC resolution by oversampling''

http://www.st.com/stonline/products/literature/an/14183.pdf

http://www.st.com/stonline/products/support/micro/files/an2668.zip

Cheers,

STOne-32. ;)

russ
Associate II
Posted on May 17, 2011 at 12:40

New app notes! Sweet. Thanks!

deng301056
Associate II
Posted on August 23, 2011 at 04:27

I believe there is a mistake in the AN2668.  In Figure 8, Resistors R1 and R3 are specified as 10K and R2 as 4M. If R1 and R3 is 10K then R2 should be 40M otherwise R1 and R3 should be 1K and R2 is 4M, that way the dithering signal is 1/4000 of the Vdd.

Can somebody check this please.

deng301056
Associate II
Posted on August 23, 2011 at 06:31

My Apology.

After examine the sample source code, I realised that the PWM is using a prescale of 55, and not full scale. With this additional info there is no error in AN2668.

Thank you