cancel
Showing results for 
Search instead for 
Did you mean: 

stm32wb55 ADC read error

swamy_8065
Associate II

Hi all,

I am using an stm32wb55 neucleo board for a wearable based project. I am using ADC1-IN1 to read the adc raw value from MCU pin PC0 of wb55 board.  A voltage divider circuit was connected to scale down the BAT voltage from (4.2-3.7) to (1.8-1.585).

Vref  = 3.3v.

Below are readings i got

BAT         ADC_BATT      read_raw

0               0                     1420 ( Expected = 0 )

3.7            1.577               2030 ( Expected = 1960 )

4.2            1.8                   2120 ( Expected = 2230 )

 

Is there any way to rectify this?

4 REPLIES 4
AScha.3
Chief II

1. did you run adc calibration ?

2. impedance of divider high? use long sampling time for adc.

3. connect 100nF on adc-in to gnd .

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

1. Yes, Calibration is done.

2. Yes, 100k and 75k resistors in dividor network. 

     sampling time : ADC_SAMPLETIME_12CYCLES_5

3. There are decoupling capacitors mounted to Vref+ pin.


swamy_8065_0-1698248670709.png

 

so try sampletime 160 cyc.

+

connect 100nF on adc-in to gnd .

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

Hi, did you find a solution for this? I am having the same problem with a STM32WB55RGV7. I have two ADC channels connected to ground and they read diferent values. One reads 1491mv and the other one 1048mv.