From b9cdadc5c6d6fddebbd5f5a133d577c6ceb7a652 Mon Sep 17 00:00:00 2001 From: gaoxu Date: Thu, 26 Oct 2023 11:17:12 +0800 Subject: [PATCH] fix(adc): fix adc oneshot mod do not split clk --- components/hal/adc_oneshot_hal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/hal/adc_oneshot_hal.c b/components/hal/adc_oneshot_hal.c index a51bbeaa66..f7cbf7072f 100644 --- a/components/hal/adc_oneshot_hal.c +++ b/components/hal/adc_oneshot_hal.c @@ -60,6 +60,8 @@ void adc_oneshot_hal_setup(adc_oneshot_hal_ctx_t *hal, adc_channel_t chan) #if SOC_ADC_DIG_CTRL_SUPPORTED && !SOC_ADC_RTC_CTRL_SUPPORTED adc_ll_digi_clk_sel(hal->clk_src); + adc_ll_digi_controller_clk_div(ADC_LL_CLKM_DIV_NUM_DEFAULT, ADC_LL_CLKM_DIV_A_DEFAULT, ADC_LL_CLKM_DIV_B_DEFAULT); + adc_ll_digi_set_clk_div(ADC_LL_DIGI_SAR_CLK_DIV_DEFAULT); #else adc_ll_set_sar_clk_div(unit, ADC_LL_SAR_CLK_DIV_DEFAULT(unit)); if (unit == ADC_UNIT_2) {