cancel
Showing results for 
Search instead for 
Did you mean: 

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

Min-Kyoung Kim
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Mike_ST
ST Employee

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

View solution in original post

1 REPLY 1
Mike_ST
ST Employee

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