diff --git a/drivers/adc/adc_esp32.c b/drivers/adc/adc_esp32.c index 434e83011bd3e8..16f7e7d785f7b3 100644 --- a/drivers/adc/adc_esp32.c +++ b/drivers/adc/adc_esp32.c @@ -654,6 +654,12 @@ static int adc_esp32_init(const struct device *dev) adc_hw_calibration(conf->unit); +#if CONFIG_SOC_SERIES_ESP32S2 || CONFIG_SOC_SERIES_ESP32C3 + if (conf->unit == 1) { + adc2_init_code_calibration(); + } +#endif /* CONFIG_SOC_SERIES_ESP32S2 || CONFIG_SOC_SERIES_ESP32C3 */ + #if defined(CONFIG_ADC_ESP32_DMA) if (!device_is_ready(conf->gpio_port)) { LOG_ERR("gpio0 port not ready");