lpcware

Code enters DeepSleep, now I can't connect debugger

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by robert.palmer on Fri Aug 24 15:40:31 MST 2012
Hello all,

First off, I have read and tried, possibly incorrectly, the information at:

http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip

I am using a RedProbe+ and programmed my chip with code that puts it into one of the deeper sleep modes (not sure which is loaded) in the FreeRTOS IdleHook (yeah, not smart, but I was experimenting).

I have proved that the chip functions, I have a UART that spits out startup messages, which do appear, and I have GPIO pin toggles in the FreeRTOS IdleHook and TickHook functions.  I can see those pins toggle a couple of times after a reset, then stop.  I can pull the EINT0 pin low to generate a wake interrupt and watch the pins toggle and then stop (going back to sleep).

When I try to program, erase or debug, the connection always fails with:

02: Failed on connect: Em(01). Cannot find selected MEM-AP (check target power)
Emu(0): Conn&Reset. Was: None. DpID: 2BA01477. Info: FTUT6ATWA

I tried the ISP steps, but as soon as I try to load my new program, I get the same failure (Em(01))

Am I missing something on the ISP steps.  Just ground P2.10, do a reset, then release P2.10, then attempt to launch the debugger and program the chip, correct?

Outcomes