Page 1 of 1

ADC External Voltage Reference (AnalogReference)

Posted: Tue Oct 04, 2022 7:58 pm
by nedsar85
Hi,

Is there a compatible command to set the external Vref through Pin 13 in the Nucleo 32 boards?
I have tried to disable Jumper SB10 and then connect directly a Vref = 3V, but, this is not completely working...

I'm looking for a compatible command like: AR_EXTERNAL as it is available for SAMD boards...

Thanks,

Re: ADC External Voltage Reference (AnalogReference)

Posted: Wed Oct 05, 2022 3:25 pm
by GonzoG
You cannot choose analog voltage reference in software. With most (if not all) STM32 MCUs there is only hardware way.
In Nucleo manuals there is information how to do it:
https://docs.rs-online.com/762c/0900766b8147aa39.pdf
p.19.
But you also need to read MCU datasheet for information about voltage range that can/need be provided.

Re: ADC External Voltage Reference (AnalogReference)

Posted: Tue Oct 18, 2022 2:18 pm
by nedsar85
Thanks GonzoG...

I found the instructions in the manual, I deactivated the SB10 and provided a direct 3Voltage to pin Vref (pin13), and now I can have a full 10bit ADC count up to 1023... (I'm using a sensor with max output of 3V)

Nevertheless, my sensor has an offset value of 400mV, I would expect that the Nucleo board could read some noise when there is no signal over the offset, but, I get only 0's ...

I'm not really sure what is going on... if you have an idea I appreciate the feedback, I will return later to post the solution if i find it...

Thanks again

Re: ADC External Voltage Reference (AnalogReference)

Posted: Tue Oct 18, 2022 3:10 pm
by nedsar85
I was having a hardware issue...
To enable the external Vref, just disable the SB10 and we should be fine... (Vref should always be < than VDD)

:)

Re: ADC External Voltage Reference (AnalogReference)

Posted: Wed Mar 29, 2023 1:57 am
by saucedense
nedsar85 wrote: Tue Oct 18, 2022 3:10 pm I was having a hardware issue...
To enable the external Vref, just disable the SB10 and we should be fine... (Vref should always be < than VDD)

:)
Hardware tuning seems a lot more complicated.