cancel
Showing results for 
Search instead for 
Did you mean: 

I am using STM32U5. I want to use 16 bit ADC but STM32U5 has only 14 bit true ADC with hardware oversampling. If I oversample and increase 2 bits leading to 16 bits; will this 16 bits be equivalent to true 16 bit ADC??

Shru2
Associate II
 
7 REPLIES 7
Bubbles
ST Employee

Hi @Shru2​,

the short answer is no, it will have some limitations compared to true 16bit ADC.

But there's plenty of information in our AN, such as https://www.st.com/content/ccc/resource/technical/document/application_note/group0/3f/4c/a4/82/bd/63/4e/92/CD00211314/files/CD00211314.pdf/jcr:content/translations/en.CD00211314.pdf

BR,

J

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.

S.Ma
Principal

SAR ADC are typically limited to 12 bit. To go beyond, check STM32 with Sigma Delta ADC (higher resolution, lower sampling rate)

Just as a caution: the effective number of bits when oversampling doesn't scale they way that first seems natural. If you oversample by a factor of 2, then you have two 14-bit samples that need a 15-bit number to hold them (i.e. 0x3FFF + 0x3FFF = 0x7FFE). So now you might think your 15-bit value has the same effective number of bits as a 15-bit ADC. It doesn't!

You need to oversample by a factor of 4 to get an increase of 1 effective bit. This means you need to sum 4 samples, which gives you a 16-bit number, and then divide it by 2 and now you should have the same effective number of bits as a 15-bit ADC. To get 2 more bits like you want, you need to sum 4*4 = 16 samples together and then divide by 2*2 = 4.

Oversampling also has a problem where it will attenuate your signal. Probably there is a transfer function for this type of filter that makes it obvious, but just think about a simple sine wave: pick any points you want, average them together, and they will always be closer to the X axis (or the mean if your sine wave is vertically shifted). So your oversampled sine wave will never get all the way to the edges of the original sine wave. You may be able to apply a corrective factor, but I'm not sure what effect that has on the effective number of bits.

Here's a link that talks about it in great detail:

https://www.silabs.com/documents/public/application-notes/an118.pdf

Douglas MILLER
ST Employee

This forum thread was marked by the moderator as needing a little more investigation, so a Support case was created in your name and will be handled off-line. Should anyone have any similar questions, please feel free to open a Support case directly at your myST portal: https://st.com/ols

Piranha
Chief II

In short - to gain additional N bits of actual analog performance, one has to oversample by a factor of 2^(2*N) and then right shift the sum by N bits.

S.Ma
Principal

Avoid the brute force. If you really need more bits, use a sigmal delta ADC, it will cost you lower sampling rate. Check on STM32F3 and newer generations.

Otherwise, make a spectrum analysis of the signal you are sampling and apply external analog or digital filtering.

SAR (binary search) ADC state of the art is around 12 bit.

We don't know the requirements of the sample rate and basically anything beyond the resolution. Adding additional chips and moving to unnecessarily larger MCUs "just because" is an amateur style...