From 92feb8c4f8212a5b850f882a34c1480477aa240c Mon Sep 17 00:00:00 2001 From: Samuel Obuch Date: Thu, 5 Jun 2025 23:57:44 +0200 Subject: [PATCH] fix(lp_core): dont reset lp cpu with debug attached --- components/ulp/lp_core/lp_core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/ulp/lp_core/lp_core.c b/components/ulp/lp_core/lp_core.c index fc5c1c4100..56df1823f1 100644 --- a/components/ulp/lp_core/lp_core.c +++ b/components/ulp/lp_core/lp_core.c @@ -91,7 +91,14 @@ esp_err_t ulp_lp_core_run(ulp_lp_core_cfg_t* cfg) #endif //ESP_ROM_HAS_LP_ROM LP_CORE_RCC_ATOMIC() { +#if CONFIG_ULP_NORESET_UNDER_DEBUG + /* lp_core module reset causes loss of configured HW breakpoints and dcsr.ebreak* */ + if (!esp_cpu_dbgr_is_attached()) { + lp_core_ll_reset_register(); + } +#else lp_core_ll_reset_register(); +#endif lp_core_ll_enable_bus_clock(true); }