cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476RET6 no pinout for ADC1_IN0? How to calculate VDDA with Vrefint?

KRauccio
Associate II

Hi,

I am making updates to a custom PCB where I would like to add ADC functionality. My board is powered by batteries and I expect the supply voltage to fluctuate slightly and I need the ADC conversions to be accurate. The reference manual says I can use the internal Vrefint to calculate what the value of VDDA/VREF+ so that I may calculate my conversions with better accuracy. Additionally, I wanted to follow this guide (https://community.st.com/t5/stm32-mcus/how-to-use-the-stm32-adc-s-internal-reference-voltage/ta-p/621425) to understand how I may implement this in firmware.

The issue I see now is that on the chip's datasheet it mentions that Vrefint is internally connected to ADC1_IN0, however, ADC1_IN0 has no pinout on this package of the chip. Furthermore, in STM32CubeMX the ADC1_IN0 channel is not able to be selected (although Vrefint channel is able to be selected).

Now I have some confusion since the datasheet mentions the internal connection. Maybe this package does not have this available? But STM32CubeMX allows me to select the Vrefint channel still, so I may not understand something.

Is there some way I may achieve ADC accuracy with some other method? Or perhaps I am missing some information?

Please let me know if anyone may be able to help me understand this better.

Thank you,

Kaitlyn

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

VREFINT is an internal net. It is not exposed on a pin.

In STM32CubeMX, the Vrefint channel is the ADC1_IN0 channel. It's available on all packages.

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

View solution in original post

4 REPLIES 4
TDK
Super User

VREFINT is an internal net. It is not exposed on a pin.

In STM32CubeMX, the Vrefint channel is the ADC1_IN0 channel. It's available on all packages.

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

Thank you for your clarification. I had known Vrefint was internally connected, but I had assumed that the channel would need to at least be enabled or have a pinout. I see this is different from other chips like the one used in the guide.

I understand now.

Thank you,

Kaitlyn

The guide enables two channels: channel 0 and VREFINT. They are independent. On that chip, channel 0 is not VREFINT.

The VREFINT channel is never exposed on a pin. It is always internal-only.

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

I see now that I was still confused. Thank you for the extra clarification.