Skip to content
Snippets Groups Projects
Commit 41a5c1d2 authored by schneider's avatar schneider Committed by rahix
Browse files

hack(FreeRTOS): Do not call WFE when a debugger is active

parent deb27e28
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,11 @@ void pre_idle_sleep(TickType_t xExpectedIdleTime)
* TODO: Ensure this is actually correct and does not have any
* race conditions.
*/
__asm volatile("dsb" ::: "memory");
__asm volatile("wfe");
__asm volatile("isb");
if ((CoreDebug->DHCSR & CoreDebug_DHCSR_C_DEBUGEN_Msk) == 0) {
__asm volatile("dsb" ::: "memory");
__asm volatile("wfe");
__asm volatile("isb");
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment