From 6a37b41df8fe23bcd492796dd77f717d5ef769cb Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Thu, 23 Dec 2021 16:39:12 +0100 Subject: [PATCH] memprot: fix debug mode check Regression from dd938eb9, the fault injection check was always failing in debug mode. --- components/esp_hw_support/port/esp32c3/esp_memprot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_hw_support/port/esp32c3/esp_memprot.c b/components/esp_hw_support/port/esp32c3/esp_memprot.c index 0be4308aea..bbda57d2b2 100644 --- a/components/esp_hw_support/port/esp32c3/esp_memprot.c +++ b/components/esp_hw_support/port/esp32c3/esp_memprot.c @@ -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; }