cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L475VG ADC usage

sagar verma
Associate II
Posted on May 09, 2018 at 10:47

Hi All

We are using STM32L475VG IoT discovery board.

We want to use the ADC1 on the board and get the Analog data input on PA0.

But we are unable to get it going using the HAL code generated using the MX cube software.

What all are the configurations needed to use the ADC?

It will also be helpful if a working example can be provided.

Our environment is visualGDB in visual studio 2017 community edition.

Regards

Sagar Verma

#stm32-l4 #adc-configuration
6 REPLIES 6
sagar verma
Associate II
Posted on May 15, 2018 at 01:44

Can anyone please assist us ?

T J
Lead
Posted on May 15, 2018 at 03:09

0690X00000604iGQAQ.jpg
Posted on May 15, 2018 at 03:29

Formatted source now out of moderation, removing it here

https://community.st.com/0D70X000006Sr84SAC

 

I lifted and ported the code from

STM32Cube_FW_L4_V1.11.0\Projects\NUCLEO-L496ZG\Examples\ADC\ADC_DMA_Transfer

Didn't see any calibration stuff there, or other samples I looked at.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 15, 2018 at 03:33

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6vD&d=%2Fa%2F0X0000000by2%2File8sCVQeejm0uLhaWtsCSALpB4QnNzjFXJhj2kak_w&asPdf=false
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 15, 2018 at 04:19

I can't see the ADC calibrate functionality,

Does this processor have a calibrate function for the ADC ?
Posted on June 05, 2018 at 05:51

Thanks Clive,

using these configurations I have been able to make the ADC work in my application.

But this configuration doesn't work if I use

ContinuousConvMode = DISABLE

Any suggestion regarding this ?