fix(adc): fix adc continuous get less results beacuse do not reset apb clk

This commit is contained in:
gaoxu 2023-11-24 15:52:59 +08:00
parent 97e33fbb75
commit 3acf3ec648
3 changed files with 5 additions and 2 deletions

View File

@ -359,6 +359,9 @@ esp_err_t adc_continuous_start(adc_continuous_handle_t handle)
ESP_RETURN_ON_FALSE(handle, ESP_ERR_INVALID_STATE, ADC_TAG, "The driver isn't initialised");
ESP_RETURN_ON_FALSE(handle->fsm == ADC_FSM_INIT, ESP_ERR_INVALID_STATE, ADC_TAG, "ADC continuous mode isn't in the init state, it's started already");
//reset ADC digital part to reset ADC sampling EOF counter
periph_module_reset(PERIPH_SARADC_MODULE);
if (handle->pm_lock) {
ESP_RETURN_ON_ERROR(esp_pm_lock_acquire(handle->pm_lock), ADC_TAG, "acquire pm_lock failed");
}

View File

@ -93,7 +93,7 @@ static inline uint32_t periph_ll_get_rst_en_mask(periph_module_t periph, bool en
switch (periph) {
case PERIPH_SARADC_MODULE:
return PCR_SARADC_RST_EN;
return PCR_SARADC_REG_RST_EN;
case PERIPH_RMT_MODULE:
return PCR_RMT_RST_EN;
case PERIPH_PCNT_MODULE:

View File

@ -106,7 +106,7 @@ static inline uint32_t periph_ll_get_rst_en_mask(periph_module_t periph, bool en
switch (periph) {
case PERIPH_SARADC_MODULE:
return PCR_SARADC_RST_EN;
return PCR_SARADC_REG_RST_EN;
case PERIPH_RMT_MODULE:
return PCR_RMT_RST_EN;
case PERIPH_PCNT_MODULE: