|
1 | 1 | /* |
2 | | - * SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD |
| 2 | + * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD |
3 | 3 | * |
4 | 4 | * SPDX-License-Identifier: Apache-2.0 |
5 | 5 | */ |
|
11 | 11 | #include "esp_intr_alloc.h" |
12 | 12 | #include "esp_debug_helpers.h" |
13 | 13 | #include "soc/periph_defs.h" |
| 14 | +#include "soc/system_intr.h" |
14 | 15 | #include "hal/crosscore_int_ll.h" |
15 | 16 |
|
16 | 17 | #include "freertos/FreeRTOS.h" |
|
20 | 21 | #include "esp_gdbstub.h" |
21 | 22 | #endif |
22 | 23 |
|
23 | | -#if CONFIG_IDF_TARGET_ESP32H21 |
24 | | -#define ETS_FROM_CPU_INTR0_SOURCE ETS_CPU_INTR_FROM_CPU_0_SOURCE |
25 | | -#endif |
26 | | - |
27 | 24 | #define REASON_YIELD BIT(0) |
28 | 25 | #define REASON_FREQ_SWITCH BIT(1) |
29 | 26 | #define REASON_PRINT_BACKTRACE BIT(2) |
@@ -98,12 +95,12 @@ void esp_crosscore_int_init(void) |
98 | 95 | esp_err_t err __attribute__((unused)) = ESP_OK; |
99 | 96 | #if CONFIG_FREERTOS_NUMBER_OF_CORES > 1 |
100 | 97 | if (esp_cpu_get_core_id() == 0) { |
101 | | - err = esp_intr_alloc(ETS_FROM_CPU_INTR0_SOURCE, ESP_INTR_FLAG_IRAM, esp_crosscore_isr, (void*)&reason[0], NULL); |
| 98 | + err = esp_intr_alloc(SYS_CPU_INTR_FROM_CPU_0_SOURCE, ESP_INTR_FLAG_IRAM, esp_crosscore_isr, (void*)&reason[0], NULL); |
102 | 99 | } else { |
103 | | - err = esp_intr_alloc(ETS_FROM_CPU_INTR1_SOURCE, ESP_INTR_FLAG_IRAM, esp_crosscore_isr, (void*)&reason[1], NULL); |
| 100 | + err = esp_intr_alloc(SYS_CPU_INTR_FROM_CPU_1_SOURCE, ESP_INTR_FLAG_IRAM, esp_crosscore_isr, (void*)&reason[1], NULL); |
104 | 101 | } |
105 | 102 | #else |
106 | | - err = esp_intr_alloc(ETS_FROM_CPU_INTR0_SOURCE, ESP_INTR_FLAG_IRAM, esp_crosscore_isr, (void*)&reason[0], NULL); |
| 103 | + err = esp_intr_alloc(SYS_CPU_INTR_FROM_CPU_0_SOURCE, ESP_INTR_FLAG_IRAM, esp_crosscore_isr, (void*)&reason[0], NULL); |
107 | 104 | #endif |
108 | 105 | ESP_ERROR_CHECK(err); |
109 | 106 | } |
|
0 commit comments