AnsweredAssumed Answered

Help needed regarding STM32L476RG nucleo ADC

Question asked by das.sharanya on Mar 19, 2016
Latest reply on Mar 21, 2016 by das.sharanya
I am working with AVRs for almost last 3 years and decided to buy a stm32 nucleo boards to have some fun with ARM and bought STM32L476RG nucleo board.I started to write code in Keil MDK-5 with the help of Hal drivers from STM32Cube MX.I coded for some Blinky and Usart successfully.But as i moved to ADC,i faced a strange problem.From the board schematics,i found that the MCU is using 3v3 external Vref.I measured with a multimeter and found 3.29v.I then coded  a program to display the ADC read value in single conversation mode via Usart.As the ADC of the STM32 is 12 bit,it should return 4095 while reading 3.3v.But whenever i am connecting PA0(Analog ADC pin 5) to 3.3v,it is returning value between 4025 to 4028.I tried to average of 100 results but got same output.Also i tried with different clock speeds but had no luck.

My question is if the error(typically 1.63% to 1.71%) is normal or if my adc unit is faulty or am i missing something????I found very little help about L476G as the controller is very new.Please reply guys...