I am working on a project involving a SAMD21 and have run into a problem related to soft reset (NVIC_SystemReset or Watchdog) not working. After the boards are manufactured they are run through a test fixture that uses the atprogram.exe + SAM-ICE to write a combined boot loader / application hex file to flash. Once the programming is complete the device is removed from the fixture for further wireless testing. After removing from the fixture (which disconnects it from the debugger) it is not possible to perform a soft reset with either NVIC_SystemReset or using the watchdog timer. The device appears to shutdown and simply halt. If the device is power cycled after being programmed the soft reset works and the device begins executing the boot loader code. The device is battery powered and placed in a sealed case so cycling the power in the current design is not a simple task at this phase of production.
While investigating the issue I found that it is not isolated to programming but more generally using the debugger in almost any form. I can cause the issue by simply physically connecting the debugger and using atprogram.exe to issue a reset.
I have seen several posts that discuss the same or similar issue but I have not seen a definitive way to remove the debugger and clear whatever it is changing that interferes with the soft reset.
Is there any way to clear the debug interface of the chip before or after removing the debugger that does not involve power cycling the device?