mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-15 14:36:45 +00:00
fix(esp_hw_support): clear reserved interrupts that are not applicable for each target
This commit is contained in:
@@ -622,7 +622,7 @@ esp_err_t esp_intr_alloc_intrstatus(int source, int flags, uint32_t intrstatusre
|
||||
esp_intr_disable(ret);
|
||||
}
|
||||
|
||||
#ifdef SOC_CPU_HAS_FLEXIBLE_INTC
|
||||
#if SOC_CPU_HAS_FLEXIBLE_INTC
|
||||
//Extract the level from the interrupt passed flags
|
||||
int level = esp_intr_flags_to_level(flags);
|
||||
esp_cpu_intr_set_priority(intr, level);
|
||||
@@ -634,6 +634,11 @@ esp_err_t esp_intr_alloc_intrstatus(int source, int flags, uint32_t intrstatusre
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SOC_INT_PLIC_SUPPORTED
|
||||
/* Make sure the interrupt is not delegated to user mode (IDF uses machine mode only) */
|
||||
RV_CLEAR_CSR(mideleg, BIT(intr));
|
||||
#endif
|
||||
|
||||
portEXIT_CRITICAL(&spinlock);
|
||||
|
||||
//Fill return handle if needed, otherwise free handle.
|
||||
|
Reference in New Issue
Block a user