Skip to content

Commit cd48833

Browse files
committed
Merge branch 'bugfix/h4_panic_handler_stuck_fix' into 'master'
fix(system): fixed cpu_stall function stuck issue on H4 Closes IDF-12311 See merge request espressif/esp-idf!40420
2 parents 2461b0c + a68022f commit cd48833

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/hal/esp32h4/include/hal/cpu_utility_ll.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ FORCE_INLINE_ATTR void cpu_utility_ll_stall_cpu(uint32_t cpu_no)
3232
{
3333
if (cpu_no == 0) {
3434
HAL_FORCE_MODIFY_U32_REG_FIELD(LP_AON.cpucore_cfg, aon_cpu_core0_sw_stall, 0x86);
35-
while(!REG_GET_BIT(HP_SYSTEM_CORE_DEBUG_RUNSTALL_CONF_REG, HP_SYSTEM_CORE0_RUNSTALLED));
3635
} else {
3736
HAL_FORCE_MODIFY_U32_REG_FIELD(LP_AON.cpucore_cfg, aon_cpu_core1_sw_stall, 0x86);
38-
while(!REG_GET_BIT(HP_SYSTEM_CORE_DEBUG_RUNSTALL_CONF_REG, HP_SYSTEM_CORE1_RUNSTALLED));
3937
}
38+
// We do not check stalled status in HP_SYSTEM_CORE_DEBUG_RUNSTALL_CONF_REG here because
39+
// it will not be set if the stalled core was in WFI when the stall happens, thus any check
40+
// is unreliable
4041
}
4142

4243
FORCE_INLINE_ATTR void cpu_utility_ll_unstall_cpu(uint32_t cpu_no)

0 commit comments

Comments
 (0)