mirror of https://github.com/ARMmbed/mbed-os.git
STM32L4: add ADC calibration
parent
6a46b9c0a7
commit
4824e18a95
|
|
@ -96,6 +96,9 @@ void analogin_init(analogin_t *obj, PinName pin)
|
|||
if (HAL_ADC_Init(&obj->handle) != HAL_OK) {
|
||||
error("Cannot initialize ADC\n");
|
||||
}
|
||||
|
||||
// Calibrate ADC
|
||||
HAL_ADCEx_Calibration_Start(&obj->handle, ADC_SINGLE_ENDED);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue