10 years, 11 months ago.

AnalogIn not functioning in Nucleo L053R8

Any code with the line: AnalogIn anything(A0); causes the system to hang. I can't use the analog inputs if I can not define them. Any ideas? Thanks, Jeff

Question relating to:

Have the same problem too!Is there a bug?

posted by Jerry Zhang 03 Mar 2015

4 Answers

10 years, 11 months ago.

Hi,

try to use PA_0 instead.

RGDS

Same result as A0, It compiles but does not execute, hangs.

posted by Jeff Johnson 12 Feb 2015
10 years, 10 months ago.

anyone knows how to fix it..??? i am having same trouble with Nucleo L053R8...

10 years, 10 months ago.

Try using a terminal program to see if a"pinmap not found for peripheral" error comes up. This means you are using a pin for the wrong thing i.e. digital for analog or mixing up SPI pins. This error flummmoxed me for 3 days until I used A0 instead of PA_0 on a nucleo 401 board when I thought they were interchangeable. I realise you've tried both terms for the one pin, maybe you should try a completely different pin on another header.
Cheers
Mike

10 years, 10 months ago.

I use Nucleo L053R8,and have the same problem.When i try to use the PC_8,it will return "pinmap not found for peripheral" .But use any ADC pin to define: AnalogIn ain(ADC_PIN),the system will hang.