From 811a790aaf718a8bac8a77baacd8a0a8c6cd5fb9 Mon Sep 17 00:00:00 2001 From: gaoxu Date: Wed, 25 Oct 2023 14:15:21 +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 ce6cb193c6..fb5f46076f 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) {