cancel
Showing results for 
Search instead for 
Did you mean: 

Measure voltage via PA3 - STM32L431

shaie
Associate
 
1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

Here are 4 example projects which use the ADC on the STM32L4:

STM32CubeL4/Projects/NUCLEO-L432KC/Examples/ADC at master · STMicroelectronics/STM32CubeL4

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

Here are 4 example projects which use the ADC on the STM32L4:

STM32CubeL4/Projects/NUCLEO-L432KC/Examples/ADC at master · STMicroelectronics/STM32CubeL4

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

Hello.

Thank you for your reply.

I'm trying to do it but it gives bad result..

If you will have an example for PA1 as input for measuring voltage it will be great.

Thanks again.

shaie
Associate

Hi.

I’m unable to write the code... it either gets stuck or gives me an incorrect value. I’d appreciate it if someone could point me in the right direction or share code that allows me to read a voltage value on PA3. Thank you very much for your help.

 

Thanks again for all the help.

There are example projects you can follow. If you can't get those up and running, I don't see how providing yet another example will help.

If you want help on your code, post your code along with your debugging findings.

This is not a forum for people to write your code for you.

 

This project converts PA4. It should be a few lines to change it to PA3. You will need to change the ADC channel and the pin initialization.

STM32CubeL4/Projects/NUCLEO-L432KC/Examples/ADC/ADC_RegularConversion_Polling at master · STMicroelectronics/STM32CubeL4

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