How to halt processor in LPC55S69

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to halt processor in LPC55S69

479 Views
irakatz
Contributor I

Hello,

I am trying to halt a processor for LPC55S69 by directly writing to DHCSR, but failed. Here are my steps for halting.

 *((volatile unsigned *)(0xE000EDF0))=0xa05f0001; // the 0xE000EDF0 is the address of DHCSR in cortex-m33, I configure C_DEBUGEN as 1 to enable halting debug

//check whether the DHCSR is modified, the answer is yes. 

 *((volatile unsigned *)(0xE000EDF0))=0xa05f0003; // I set the C_HALT as 1 to halt the processor

//some other operations

But when I execute these codes I find the other operations are executed, and when I read the DHCSR again I find the C_DEBUGEN is modified as 0. It is clear that if this bit is set as 0 (I don't know who changes this bit), then C_HALT is invalid. Maybe this is the reason why I cannot halt the processor.

Can someone help me to halt the processor? If I succeed, the other operations should not be executed.

0 Kudos
0 Replies