7 years, 11 months ago.

ADC problem ST Nucleo STM32F303K8

Hi guys, I have a problem about reading analog pins with a board Nucleo STM32F303K8. The reading value differs from the real one of about 50mV. This Seems to be due to a failure of the initial ADC calibration in mbed libraries. In fact, using the libraries of STM32CubeMX, that the calibration is implemented, the problem is resolved. How can I solve the problem in mbed? Thanks guys.

2 Answers

7 years, 7 months ago.

I've made a bug report and example of how to fix / workaround:

https://developer.mbed.org/forum/bugs-suggestions/topic/27745/

You should report bugs here: https://github.com/ARMmbed/mbed-os/issues/ You can also fork mbed lib, implement the improvement / bug fix and create a pull request.

posted by Mark Peter Vargha 02 May 2017
7 years, 11 months ago.

Hello Federico,
You can combine mbed with CubeMX and call the HAL_ADCEx_Calibration_Start function from your mbed code as for example in the following demo:

https://developer.mbed.org/users/hudakz/code/Internal_Temperature_F103RB/

Thank you for your response, I managed to make it work just like you suggested. I propose a clean solution, would be possible to modify the mbed-dev library, and then integrate the amendment in the library?

posted by Federico Gaetani 21 Jan 2017