Merge branch 'bugfix/cache_err_int' into 'master'

esp32: fix cache error interrupt handler

See merge request !1231
This commit is contained in:
Ivan Grokhotkov 2017-09-08 11:55:01 +08:00
commit c5988403f4
2 changed files with 4 additions and 2 deletions

View File

@ -29,6 +29,7 @@
#include "esp_attr.h" #include "esp_attr.h"
#include "soc/dport_reg.h" #include "soc/dport_reg.h"
#include "sdkconfig.h" #include "sdkconfig.h"
#include "esp_dport_access.h"
void esp_cache_err_int_init() void esp_cache_err_int_init()
{ {
@ -72,6 +73,7 @@ void esp_cache_err_int_init()
int IRAM_ATTR esp_cache_err_get_cpuid() int IRAM_ATTR esp_cache_err_get_cpuid()
{ {
esp_dport_access_int_pause();
const uint32_t pro_mask = const uint32_t pro_mask =
DPORT_PRO_CPU_DISABLED_CACHE_IA_DRAM1 | DPORT_PRO_CPU_DISABLED_CACHE_IA_DRAM1 |
DPORT_PRO_CPU_DISABLED_CACHE_IA_DROM0 | DPORT_PRO_CPU_DISABLED_CACHE_IA_DROM0 |

View File

@ -184,7 +184,7 @@ void esp_dport_access_int_init(void)
assert(res == pdTRUE); assert(res == pdTRUE);
} }
void esp_dport_access_int_pause(void) void IRAM_ATTR esp_dport_access_int_pause(void)
{ {
portENTER_CRITICAL_ISR(&g_dport_mux); portENTER_CRITICAL_ISR(&g_dport_mux);
dport_core_state[0] = DPORT_CORE_STATE_IDLE; dport_core_state[0] = DPORT_CORE_STATE_IDLE;
@ -194,7 +194,7 @@ void esp_dport_access_int_pause(void)
portEXIT_CRITICAL_ISR(&g_dport_mux); portEXIT_CRITICAL_ISR(&g_dport_mux);
} }
void esp_dport_access_int_resume(void) void IRAM_ATTR esp_dport_access_int_resume(void)
{ {
portENTER_CRITICAL_ISR(&g_dport_mux); portENTER_CRITICAL_ISR(&g_dport_mux);
dport_core_state[0] = DPORT_CORE_STATE_RUNNING; dport_core_state[0] = DPORT_CORE_STATE_RUNNING;