Commit 9acc32b4 authored by Tobias Badertscher's avatar Tobias Badertscher Committed by Damien George

stm32/adc: Add ADC auto-calibration for L4 MCUs.

This increases the precision of the ADC.
parent 7c85c7c2
......@@ -263,6 +263,9 @@ STATIC void adcx_init_periph(ADC_HandleTypeDef *adch, uint32_t resolution) {
#if defined(STM32H7)
HAL_ADCEx_Calibration_Start(adch, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED);
#endif
#if defined(STM32L4)
HAL_ADCEx_Calibration_Start(adch, ADC_SINGLE_ENDED);
#endif
}
STATIC void adc_init_single(pyb_obj_adc_t *adc_obj) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment