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
  • Hi

    Yes application that is intended for one-time use. In the event that I need to reuse it, I can simply reprogram it. To facilitate this, I am seeking a method to halt the CPU once the application reaches its conclusion.

    The reason behind this requirement is that I have developed a software tool to debug the device, and it is essential for me to determine when a application has finished execution. As it stands, the application continues to run indefinitely, making it difficult for me to ascertain its completion status.

    Thanks
    Mario

Reply
  • Hi

    Yes application that is intended for one-time use. In the event that I need to reuse it, I can simply reprogram it. To facilitate this, I am seeking a method to halt the CPU once the application reaches its conclusion.

    The reason behind this requirement is that I have developed a software tool to debug the device, and it is essential for me to determine when a application has finished execution. As it stands, the application continues to run indefinitely, making it difficult for me to ascertain its completion status.

    Thanks
    Mario

Children