2 years ago.

First Analog In not working on Nucleo 432KC

I am running into an issue with the AnalogIn functionality on my NUCLEOL432KC. The issue is that the first call to read an analogIn pin fails and reports erroneous values. It seems to be the same issue mentioned herehttps://os.mbed.com/questions/83751/AnalogIn-Problem-in-NUCLEO-L433-and-L432/?c=32690 and herehttps://os.mbed.com/questions/83632/AnalogIn-First-declared-AnalogIn-not-wor/. Declaring a dummy analog input on a free pin and calling it before the ones I want to measure is a valid workaround, but a cleaner solution would be great.

I am using the mbed-cli with 5.13.2 version of mbed-os and gcc 8.2.1.

Thanks a lot! Best, Eduardo

1 Answer

2 years ago.

Hi Eduardo,

I think this issue has been resolved by this PR.

https://github.com/ARMmbed/mbed-os/pull/11072

It will be released in Mbed OS 5.14, before that, you could apply the PR into your project if you need this solution before that. Bu of course that needs offline mbed-cli.

Regards, Desmond