memprot: fix debug mode check

Regression from dd938eb9, the fault injection check was always failing
in debug mode.
pull/8162/head
Ivan Grokhotkov 2021-12-23 16:39:12 +01:00
rodzic 384df18770
commit 6a37b41df8
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -650,7 +650,7 @@ esp_err_t esp_mprot_set_prot(const esp_memp_config_t *memp_config)
// 1.check the signal repeatedly to avoid possible glitching attempt
// 2.leave the Memprot unset to allow debug operations
if (esp_cpu_in_ocd_debug_mode()) {
ESP_FAULT_ASSERT(!esp_cpu_in_ocd_debug_mode());
ESP_FAULT_ASSERT(esp_cpu_in_ocd_debug_mode());
return ESP_OK;
}