This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Can halt the cpu when at end of application

Hi

can i halt the cpu when i am at end of code? like this:

#endif
	(void)WDT1_Service();
	__asm("WFI");
		// Enable Debugging
	CoreDebug->DHCSR |= CoreDebug_DHCSR_C_DEBUGEN_Msk;

	// Halt the processor
	CoreDebug->DHCSR |= CoreDebug_DHCSR_C_HALT_Msk;

  for (;;)
  {
    
  }
}

Parents
  • That seems a very strange approach to deducing that information.  Your device doing nothing at all would still have two possible causes: it shut itself down on purpose, or it's completely hosed.  In short, absence of reaction is very rarely a good way to signal anything.

Reply
  • That seems a very strange approach to deducing that information.  Your device doing nothing at all would still have two possible causes: it shut itself down on purpose, or it's completely hosed.  In short, absence of reaction is very rarely a good way to signal anything.

Children
No data