cancel
Showing results for 
Search instead for 
Did you mean: 

ADC wiring on stm32f303re Nucleo board

David Pekin
Senior
Posted on January 03, 2018 at 22:27

Hello,

I have a simple application where I need to sample a single ADC line periodically.  I can use polling rather than DMA and interrupts since the timing requirements are very slow.  

Anyway, I've taken an ADC sample and started to run it but I'm not getting what I would expect for the 12 bit single ended ADC reading. When the analog input line is floating, I get a value around 1700.  If I tie the analog input to ground I get a value around 1700.  If I tie the analog input to 3.3V  I get a value of around 1700.  If I tie the analog input to 5V I get a value of 4095, the top rail.  

Is there some external reference wiring needed  on the Nucleo board to make the ADC work?

Thanks,

Dave

#adc-poll
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on January 04, 2018 at 00:05

Thank you all.  It was my mistake.  It's time to focus on something else for a while...  The jumpers were on the wrong ADC pins.  No wonder I wasn't getting what was expected!  All is working as expected now.  

View solution in original post

3 REPLIES 3
LMI2
Lead
Posted on January 03, 2018 at 22:42

Have you checked that your ADC is really connected to a pin. My board, not 303, CPU pins are not always connected to where I want. There is a resistor field on the board, which connects pins and CPU legs.

BRYAN SPEED
Senior
Posted on January 03, 2018 at 23:32

One suggestion is to review the information on pages 90 to 93 of the Datasheet. With this information you may be able to determine if the applied voltages, external resistance and ADC reference voltage are correct for your application.

A single resistor that is either in series with the signal source or in shunt to the signal source and ADC input should suffice for initial purposes. This signal path should share a common ground.

http://www.st.com/content/ccc/resource/technical/document/datasheet/8a/f4/9d/d7/61/1b/46/b4/DM00105960.pdf/files/DM00105960.pdf/jcr:content/translations/en.DM00105960.pdf

Posted on January 04, 2018 at 00:05

Thank you all.  It was my mistake.  It's time to focus on something else for a while...  The jumpers were on the wrong ADC pins.  No wonder I wasn't getting what was expected!  All is working as expected now.