Skip to content

Commit 3cb9fa8

Browse files
fprfpistm
fpr
authored andcommitted
Fixes issue on ADC value: calibration function wasn't called
Signed-off-by: fpr <[email protected]>
1 parent 56ce558 commit 3cb9fa8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/arduino/stm32/analog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,9 @@ uint16_t adc_read_value(PinName pin)
615615
return 0;
616616
}
617617

618-
#if defined (STM32F0xx) || defined (STM32F3xx) || defined (STM32L4xx)
618+
#if defined (STM32F0xx) || defined (STM32F1xx) || defined (STM32F3xx) || defined (STM32L4xx)
619619
/*##-2.1- Calibrate ADC then Start the conversion process ####################*/
620-
#if defined (STM32F0xx)
620+
#if defined (STM32F0xx) || defined (STM32F1xx)
621621
if (HAL_ADCEx_Calibration_Start(&AdcHandle) != HAL_OK)
622622
#else
623623
if (HAL_ADCEx_Calibration_Start(&AdcHandle, ADC_SINGLE_ENDED) != HAL_OK)

0 commit comments

Comments
 (0)