10 years, 3 months ago.

Problem with Nucleo L152RE AnalogIn?

On the Nucleo L152RE with mbed library revision 78 up to 81 AnalogIn works as specified. From revision 82 to the latest 88 it stopped working. When the ADC is read by using the read_u16() function of the AnalogIn class, the program hangs and never continues to the next step.

Question relating to:

ST
A world leader in providing the semiconductor solutions that make a positive contribution to people’s lives, both today and in the future.

2 Answers

10 years, 3 months ago.

Hi,

I have checked the AnalogIn on L152RE and I confirm the issue.

After analysis, I found the error, and it is due because the HSI is not enabled. With the automatic clock configuration (implemented in V82) the HSI is not enabled when the MCU is clocked by HSE (external xtal or MCO from ST-Link part). And the ADC on this device is clocked by the HSI only.

I am going to correct it in GitHub. I will also check the L053R8 and the other devices.

Thanks for having noticed this.

Best regards.

Accepted Answer

Hi, did you correct this issue for the L053R8?

Thanks, Best regards

posted by etienne ancelin 14 May 2015
10 years, 3 months ago.

Hi,

I have nearly the same problem with the Nucleo L053R8, AnalogIn doesnt seem to work anyway. So the result is always 0.00V, did you fixed your problem?

Unfortunately not fixed yet.

posted by Mike Venter 03 Sep 2014