How to detect the LPC4357(Cortex M4) is running in debug mode? I mean run the code via Keil Ulink-ME. Is there any register can be used to check?
Leo, I use this on Cortex M3, I'm not sure if you can do the same on M4 but my guess is "yes". Check if the register is the same etc
// On Cortex CPU's, only enable watchdog if not running in debugger if ((CoreDebug->DHCSR & 0x0001)==0) { Chip_WWDT_Start(LPC_WWDT); }
Carsten,
It works in M4. Thank you!