mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
esp32: disable DPORT access protection when doing esp_restart
DPORT access protection can not work when the other CPU is stalled. Writes to DPORT registers in esp_restart caused the program to hang due to access protection, and the reset happened due to RTC_WDT, not SW_RST. This change adds esp_dport_access_int_deinit function and calls it from esp_restart once the other core is stalled.
This commit is contained in:
@@ -193,3 +193,13 @@ void esp_dport_access_int_init(void)
|
||||
xTaskCreatePinnedToCore(&dport_access_init_core1, "dport1", 512, NULL, 5, NULL, 1);
|
||||
}
|
||||
}
|
||||
|
||||
void esp_dport_access_int_deinit(void)
|
||||
{
|
||||
portENTER_CRITICAL_ISR(&g_dport_mux);
|
||||
dport_core_state[0] = DPORT_CORE_STATE_IDLE;
|
||||
#ifndef CONFIG_FREERTOS_UNICORE
|
||||
dport_core_state[1] = DPORT_CORE_STATE_IDLE;
|
||||
#endif
|
||||
portEXIT_CRITICAL_ISR(&g_dport_mux);
|
||||
}
|
||||
|
Reference in New Issue
Block a user