From 8bf4cb3eeefd4a6b11df3991ce22dff12d96e625 Mon Sep 17 00:00:00 2001 From: Armando Date: Wed, 12 Jul 2023 17:24:19 +0800 Subject: [PATCH] fix(adc): fixed esp32, esp32s2,esp32s3 adc oneshot mode clk div issue --- components/hal/esp32/include/hal/adc_hal_conf.h | 2 +- components/hal/esp32c3/include/hal/adc_hal_conf.h | 2 -- components/hal/esp32h2/include/hal/adc_hal_conf.h | 2 -- components/hal/esp32s2/include/hal/adc_hal_conf.h | 2 +- components/hal/esp32s3/include/hal/adc_hal_conf.h | 2 +- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/components/hal/esp32/include/hal/adc_hal_conf.h b/components/hal/esp32/include/hal/adc_hal_conf.h index 46af19887a..7e468b1ed0 100644 --- a/components/hal/esp32/include/hal/adc_hal_conf.h +++ b/components/hal/esp32/include/hal/adc_hal_conf.h @@ -26,6 +26,6 @@ #define SOC_ADC_PWDET_CCT_DEFAULT (4) -#define SOC_ADC_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (2) +#define SOC_ADC_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (1) #define SOC_ADC_DIGI_SAR_CLK_DIV_DEFAULT (16) diff --git a/components/hal/esp32c3/include/hal/adc_hal_conf.h b/components/hal/esp32c3/include/hal/adc_hal_conf.h index 02e43632d2..0addf51d23 100644 --- a/components/hal/esp32c3/include/hal/adc_hal_conf.h +++ b/components/hal/esp32c3/include/hal/adc_hal_conf.h @@ -26,6 +26,4 @@ #define SOC_ADC_PWDET_CCT_DEFAULT (4) -#define SOC_ADC_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) ((PERIPH_NUM==0)? 2 : 1) - #define SOC_ADC_DIGI_SAR_CLK_DIV_DEFAULT (1) diff --git a/components/hal/esp32h2/include/hal/adc_hal_conf.h b/components/hal/esp32h2/include/hal/adc_hal_conf.h index 02e43632d2..0addf51d23 100644 --- a/components/hal/esp32h2/include/hal/adc_hal_conf.h +++ b/components/hal/esp32h2/include/hal/adc_hal_conf.h @@ -26,6 +26,4 @@ #define SOC_ADC_PWDET_CCT_DEFAULT (4) -#define SOC_ADC_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) ((PERIPH_NUM==0)? 2 : 1) - #define SOC_ADC_DIGI_SAR_CLK_DIV_DEFAULT (1) diff --git a/components/hal/esp32s2/include/hal/adc_hal_conf.h b/components/hal/esp32s2/include/hal/adc_hal_conf.h index 1044f57cb2..519da382cc 100644 --- a/components/hal/esp32s2/include/hal/adc_hal_conf.h +++ b/components/hal/esp32s2/include/hal/adc_hal_conf.h @@ -26,6 +26,6 @@ #define SOC_ADC_PWDET_CCT_DEFAULT (4) -#define SOC_ADC_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) ((PERIPH_NUM==0)? 2 : 1) +#define SOC_ADC_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (1) #define SOC_ADC_DIGI_SAR_CLK_DIV_DEFAULT (2) diff --git a/components/hal/esp32s3/include/hal/adc_hal_conf.h b/components/hal/esp32s3/include/hal/adc_hal_conf.h index 02e43632d2..32100c6150 100644 --- a/components/hal/esp32s3/include/hal/adc_hal_conf.h +++ b/components/hal/esp32s3/include/hal/adc_hal_conf.h @@ -26,6 +26,6 @@ #define SOC_ADC_PWDET_CCT_DEFAULT (4) -#define SOC_ADC_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) ((PERIPH_NUM==0)? 2 : 1) +#define SOC_ADC_SAR_CLK_DIV_DEFAULT(PERIPH_NUM) (1) #define SOC_ADC_DIGI_SAR_CLK_DIV_DEFAULT (1)