File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -916,7 +916,7 @@ uint16_t adc_read_value(PinName pin)
916916 !defined (STM32WBxx) && !defined (STM32F373xC) && !defined (STM32F378xx)
917917 AdcChannelConf.Offset = 0 ; /* Parameter discarded because offset correction is disabled */
918918#endif
919- #if defined (STM32H7xx)
919+ #if defined (STM32H7xx) || defined(STM32MP1xx)
920920 AdcChannelConf.OffsetRightShift = DISABLE; /* No Right Offset Shift */
921921 AdcChannelConf.OffsetSignedSaturation = DISABLE; /* Signed saturation feature is not used */
922922#endif
@@ -929,12 +929,13 @@ uint16_t adc_read_value(PinName pin)
929929
930930#if defined(STM32F0xx) || defined(STM32F1xx) || defined(STM32F3xx) || \
931931 defined (STM32G0xx) || defined (STM32G4xx) || defined (STM32H7xx) || \
932- defined (STM32L0xx) || defined (STM32L4xx) || defined (STM32WBxx)
932+ defined (STM32L0xx) || defined (STM32L4xx) || defined (STM32MP1xx) || \
933+ defined (STM32WBxx)
933934 /* ##-2.1- Calibrate ADC then Start the conversion process ####################*/
934935#if defined(STM32F0xx) || defined(STM32G0xx) || defined(STM32F1xx) || \
935936 defined (STM32F373xC) || defined (STM32F378xx)
936937 if (HAL_ADCEx_Calibration_Start (&AdcHandle) != HAL_OK)
937- #elif defined (STM32H7xx)
938+ #elif defined (STM32H7xx) || defined(STM32MP1xx)
938939 if (HAL_ADCEx_Calibration_Start (&AdcHandle, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED) != HAL_OK)
939940#else
940941 if (HAL_ADCEx_Calibration_Start (&AdcHandle, ADC_SINGLE_ENDED) != HAL_OK)
You can’t perform that action at this time.
0 commit comments