We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello,
As part of my diagnostic regime I wanted the diag to halt when completed. It doesn't seem like it can. It seems to keep running when I
CoreDebug->DHCSR = (0xA05FUL << CoreDebug_DHCSR_DBGKEY_Pos) | CoreDebug_DHCSR_C_HALT_Msk | CoreDebug_DHCSR_C_DEBUGEN_Msk;
CoreDebug->DHCSR = (0xA05FUL << CoreDebug_DHCSR_DBGKEY_Pos) |
CoreDebug_DHCSR_C_HALT_Msk |
CoreDebug_DHCSR_C_DEBUGEN_Msk;
Thanks, Tom
[0] bit C_DEBUGEN (register DHCSR) - This can only be written by AHB-AP and not by the core. It is ignored when written by the core, which cannot set or clear it.
[1] bit C_HALT (register DHCSR) - The core can halt itself, but only if C_DEBUGEN is already 1.
Try to set C_DEBUGEN in register DHCSR to 1 via debug access port and then halt the processor via setting C_HALT bit to 1 by the Core.