mirror of
https://github.com/espressif/esp-idf.git
synced 2026-01-20 00:08:44 +00:00
Merge branch 'fix/adc_continuous_iram_config' into 'master'
fix(adc): fix ESP32/S2 panic when use continuous ADC Closes IDFGH-16388 See merge request espressif/esp-idf!41732
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -43,7 +43,12 @@ static IRAM_ATTR void adc_dma_intr_handler(void *arg)
|
||||
|
||||
esp_err_t adc_dma_intr_event_init(adc_continuous_ctx_t *adc_ctx)
|
||||
{
|
||||
return (esp_intr_alloc(i2s_periph_signal[ADC_DMA_I2S_HOST].irq, ESP_INTR_FLAG_IRAM, adc_dma_intr_handler,
|
||||
int intr_flags = ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_SHARED;
|
||||
#if CONFIG_ADC_CONTINUOUS_ISR_IRAM_SAFE
|
||||
intr_flags |= ESP_INTR_FLAG_IRAM;
|
||||
#endif
|
||||
|
||||
return (esp_intr_alloc(i2s_periph_signal[ADC_DMA_I2S_HOST].irq, intr_flags, adc_dma_intr_handler,
|
||||
(void *)adc_ctx, &adc_ctx->adc_dma.dma_intr_hdl));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -40,7 +40,12 @@ static IRAM_ATTR void adc_dma_intr_handler(void *arg)
|
||||
|
||||
esp_err_t adc_dma_intr_event_init(adc_continuous_ctx_t *adc_ctx)
|
||||
{
|
||||
return (esp_intr_alloc(spicommon_irqdma_source_for_host(ADC_DMA_SPI_HOST), ESP_INTR_FLAG_IRAM, adc_dma_intr_handler,
|
||||
int intr_flags = ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_SHARED;
|
||||
#if CONFIG_ADC_CONTINUOUS_ISR_IRAM_SAFE
|
||||
intr_flags |= ESP_INTR_FLAG_IRAM;
|
||||
#endif
|
||||
|
||||
return (esp_intr_alloc(spicommon_irqdma_source_for_host(ADC_DMA_SPI_HOST), intr_flags, adc_dma_intr_handler,
|
||||
(void *)adc_ctx, &adc_ctx->adc_dma.dma_intr_hdl));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user