AS7 fails to enter debug mode

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This one has me stumped. I am trying to debug a new project using JTAG and ICE. The device is a 1284P. I can contact the device and program the fuses, using the Device Programming tab, I can load and verify the code. But, I can't enter debugging mode. When I try to debug, the green progress bar gets 99% of the way and then stalls out when it tries to load symbols. It pauses a bit and then errors out with a "failed to leave programming mode" error. I am sure that it isn't the tools, because I get the same problem with the ICE and with an AVR ONE. I've tried restarting AS7 and the PC, no luck.

 

Any ideas on what might be causing this?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I thought that I should bring this thread full circle. After staring that this PCB a while, I tried to load the same code into a different board. That worked fine, which told me the problem was hardware on the PCB somewhere. After scratching my head some more, I decided that it was probably related to timing and I checked for the clock signal on the XCLK pins. No clock. I am using a 16.384 MHz four terminal crystal. Unfortunately, I had used the wrong footprint, and connected the ground terminals to the XCLK pins instead of the clock. I fixed that with some bodge wire and presto, now I had a clock and was able to enter debugging mode with no difficulty.

 

So, if there is a lesson in this (besides double checking your footprints) its that the debugger in AS7 needs a stable clock and won't load up without it. So, if the debugger won't load, check the clock.