From bbde86d95b9310206f536b7e9a3dad0216cfa695 Mon Sep 17 00:00:00 2001 From: HalfSweet Date: Sun, 20 Aug 2023 12:36:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DAir001=E7=9A=84ADC?= =?UTF-8?q?=E8=AF=BB=E5=8F=96=E4=B8=AD=E5=A4=8D=E4=BD=8D=E5=8F=AF=E8=83=BD?= =?UTF-8?q?=E4=BC=9A=E5=AF=BC=E8=87=B4=E8=AF=BB=E5=8F=96=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libraries/SrcWrapper/src/air/analog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/SrcWrapper/src/air/analog.cpp b/libraries/SrcWrapper/src/air/analog.cpp index 3bed9ad..199158f 100644 --- a/libraries/SrcWrapper/src/air/analog.cpp +++ b/libraries/SrcWrapper/src/air/analog.cpp @@ -622,6 +622,12 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef *hadc) } #endif #ifdef __HAL_RCC_ADC_CLK_ENABLE + +#if defined(AIR001xx) + __HAL_RCC_ADC_FORCE_RESET(); + __HAL_RCC_ADC_RELEASE_RESET(); +#endif + __HAL_RCC_ADC_CLK_ENABLE(); #endif /* For AIR32F1xx, AIRH7xx, and AIRMP1xx ADC prescaler is configured in