Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 2 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:
2 Answers
10 years, 2 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.