STM32L4: add ADC calibration

pull/5210/head
bcostm 2017-09-27 14:38:34 +02:00
parent 6a46b9c0a7
commit 4824e18a95
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}
}