cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Values conversion is not proper whenever with DMA Multiple Channels ?

RJANA.2
Associate III

Hello Support Team,

Im using ADC1 DMA Multiple channels for conversion of Analog Data.. But after Reaching 3.2 Volts ADC Binary values will be Constant or 4096 only.. It is not converting as per variation with respect to input to ADC Channele after reaching 3.2 Volts

In real time we are not using any Devider circuit , Simply we are giving Bosch MAP Sensor output voltage to Controller ADC Pins

Thanks in Advance..!

1 ACCEPTED SOLUTION

Accepted Solutions
RJANA.2
Associate III

Hi @TDK​  Im getting Binary Values But somehow controller is assuming Vref as an +5V and we are applying maximum 3.3 Volts in the input... after our calculation & observation Im getting Binary values as per consideration of 5Volts reference...Not by considering 3.3 Volts as an Reference voltage

Even there is no options present in STM32 CubeMX or in software to change an Reference Voltage.

View solution in original post

8 REPLIES 8
TDK
Guru

Custom board or known good hardware? How is VDDA/VREF+ wired? What Busch sensor?

General tips for accuracy:

https://www.st.com/resource/en/application_note/cd00211314-how-to-get-the-best-adc-accuracy-in-stm32-microcontrollers-stmicroelectronics.pdf

> 4096 

Max 12-bit value is 4095, presumably that's a typo.

If you feel a post has answered your question, please click "Accept as Solution".
RJANA.2
Associate III

Still Isuue is not Resolved... can anyone sugeest best please

Can’t get anywhere If you ignore the responses you get.
If you feel a post has answered your question, please click "Accept as Solution".
RJANA.2
Associate III

Hi @TDK​  Im getting Binary Values But somehow controller is assuming Vref as an +5V and we are applying maximum 3.3 Volts in the input... after our calculation & observation Im getting Binary values as per consideration of 5Volts reference...Not by considering 3.3 Volts as an Reference voltage

Even there is no options present in STM32 CubeMX or in software to change an Reference Voltage.

Hi @TDK​ 

What do you want? You haven't answered any of my questions in my original post. You've also marked your own post as the solution.

Saying VREF+ is 5V is nonsense. Show the logic you used to arrive at that conclusion.

If you feel a post has answered your question, please click "Accept as Solution".

You probably need to use resistive divider (for example R1=530 Ohm R2=1000Ohm) to convert 0...5v sensor output voltage range to 0...3.3v STM32's ADC input range.

RJANA.2
Associate III

Thank you for the Response.. Team of STM Community 

Im working with STM32F413ZHTx Controller Board is Designed by our organization, I have selected ADC Channel-2 and Channel-3 

So Basically Im using Two ADC Channels(Pins) for specific Project, Because of Multichannels I have choosed to work with 

DMA Method for faster speed of operations and to reduce the task of Interrupts on CPU Handling constraints

1. Pressure sensor maximum output voltage will be 5Volts, Later after using Devider circuit Im converting +5V to 3.3V and Giving to ADC Pins

2. Even +5V is converting to 3.3 by devider circuit, Parallelly I have calculated Theoratical calculation by considering Reference voltage by +5V and +3.3V

3. Right Now I should get Binary values as per the theory calculation of 3.3 V reference, But somehow im getting Binary numbers by considering 5V

4. Even in Hardware Vref voltage will directly connected to VDD and Im getting 3.3 Volts there

5. So in Hardware vref im getting 3.3v and there is no specific option to change vref in sofware as well.

6. Why Hardware is Behaving like this ? If I program the same code in another Board, there it is working fine.. Only im facing issue in one Board 

More Info :

1. StepSize = Vref/2^n = 3.3/4096