From aad78c3022751931087e7b84917ac867190ac32a Mon Sep 17 00:00:00 2001 From: Armando Date: Mon, 17 Feb 2025 11:23:34 +0800 Subject: [PATCH] fix(adc): fixed adc function register not reset issue --- components/hal/esp32c6/include/hal/adc_ll.h | 2 ++ components/hal/esp32h2/include/hal/adc_ll.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/components/hal/esp32c6/include/hal/adc_ll.h b/components/hal/esp32c6/include/hal/adc_ll.h index db51a869da..2d2e553349 100644 --- a/components/hal/esp32c6/include/hal/adc_ll.h +++ b/components/hal/esp32c6/include/hal/adc_ll.h @@ -570,6 +570,8 @@ static inline void adc_ll_enable_bus_clock(bool enable) */ static inline void adc_ll_reset_register(void) { + PCR.saradc_conf.saradc_rst_en = 1; + PCR.saradc_conf.saradc_rst_en = 0; PCR.saradc_conf.saradc_reg_rst_en = 1; PCR.saradc_conf.saradc_reg_rst_en = 0; } diff --git a/components/hal/esp32h2/include/hal/adc_ll.h b/components/hal/esp32h2/include/hal/adc_ll.h index 8c02ddd191..e64cca4d2a 100644 --- a/components/hal/esp32h2/include/hal/adc_ll.h +++ b/components/hal/esp32h2/include/hal/adc_ll.h @@ -571,6 +571,8 @@ static inline void adc_ll_enable_bus_clock(bool enable) */ static inline void adc_ll_reset_register(void) { + PCR.saradc_conf.saradc_rst_en = 1; + PCR.saradc_conf.saradc_rst_en = 0; PCR.saradc_conf.saradc_reg_rst_en = 1; PCR.saradc_conf.saradc_reg_rst_en = 0; }