Debugging with Sleep Mode

Applications that go to sleep can be challenging to debug. However, mechanisms are available for debugging applications that use sleep mode. For example, the swmTrace module described in section Printing to a Console with swmTrace, can be used to print data up to the point of sleeping and immediately after wakeup. The UART variant of this module is another possible way to debug during sleep mode. Other simple techniques, such as setting a GPIO high while in sleep mode and low when exiting, can be used to quickly verify operation and whether the device has entered and exited sleep mode. This, and other ways to work with sleep mode are demonstrated in the sleep_mode sample application. See the readme file included in that sample for more information.

NOTE: Breakpoints are still active after waking from sleep. When the processor is asleep, it can still transmit data or respond to a debugger.