Skip to main content
Min-Kyoung Kim
Associate III
September 30, 2019
Solved

How Can I get the battery level using "GPIO_Analog" ?

  • September 30, 2019
  • 1 reply
  • 1347 views

I'm using "STM32L452CC".

PA11 pin in connected to battery level checking part.

But I can check only ADC1_EXTI11,

and I'm using ADC1_IN5,6,7,8,9(PA0,1,2,3,4 pins) DMA_cirgular.

0690X000009joaKQAQ.jpg

So, for battery level checking, I wanna use "GPIO_Analog".

But i cannot search any example or any function in stm32l4xx_hal_gpio.c, stm32l4xx_hal_adc.c or in hal library.

How can I get the value of gpio_analog pin?

This topic has been closed for replies.
Best answer by Mike_ST

Please check in the L4 repository, you can find some examples:

C:\Users\$USER\STM32Cube\Repository\STM32Cube_FW_L4_V1.14.0\Projects\NUCLEO-L452RE\Examples\ADC\ADC_RegularConversion_Polling

1 reply

Mike_ST
Mike_STBest answer
ST Technical Moderator
September 30, 2019

Please check in the L4 repository, you can find some examples:

C:\Users\$USER\STM32Cube\Repository\STM32Cube_FW_L4_V1.14.0\Projects\NUCLEO-L452RE\Examples\ADC\ADC_RegularConversion_Polling

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.