Skip to content

Commit

Permalink
Merge branch 'bugfix/adc2_legacy_oneshot_clk_gating_issue' into 'rele…
Browse files Browse the repository at this point in the history
…ase/v4.4'

adc: fix legacy oneshot driver clock gating issue on c3 (v4.4)

See merge request espressif/esp-idf!22609
  • Loading branch information
suda-morris committed Mar 9, 2023
2 parents 7d727ff + f0af48b commit 6e950ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/driver/adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ int adc1_get_raw(adc1_channel_t channel)
adc_power_acquire();

SAR_ADC1_LOCK_ACQUIRE();
adc_ll_digi_clk_sel(0);

adc_atten_t atten = s_atten1_single[channel];
uint32_t cal_val = adc_get_calibration_offset(ADC_NUM_1, channel, atten);
Expand Down Expand Up @@ -760,6 +761,7 @@ esp_err_t adc2_get_raw(adc2_channel_t channel, adc_bits_width_t width_bit, int *
adc_power_acquire();

SAR_ADC2_LOCK_ACQUIRE();
adc_ll_digi_clk_sel(0);

adc_arbiter_t config = ADC_ARBITER_CONFIG_DEFAULT();
adc_hal_arbiter_config(&config);
Expand Down

0 comments on commit 6e950ad

Please sign in to comment.