I am attempting my first Atmel project (I have much experience with other processor lines) and am having trouble getting debugWIRE to work reliably. I have a custom circuit board with an Atmega 328P_AUR processor. I am using the latest version of Atmel Studio and a new AVR Dragon programming/debugging tool. The tool is connected to the target via the 6 pin SPI/debugWIRE interface and the cable is short - ~4". I am able to use the debugWIRE interface to load and start a trivial program - some of the time. Other times I get a "Failed to launch debug session with debugWIRE" message. When successful, the time required to load and start varies from more or less instantaneous to 20 seconds or so. Attempting to load a real application results is timeout messages and frequently results in AtmelStudio hanging.
- The reset pull-up is 10K
- There are no capacitors (or other components) on the reset line
- The board has solid ground plane
- The power supply is clean
- As observed on a 'scope, the debugWIRE signal on the reset line looks clean - although there are extended periods of inactivity (timeout?)
- Loading the application using the SPI interface appears to work as expected.
I'm guessing that there is a high error rate in the communication between the AVR Dragon and my board via debugWIRE, but I have not clues as to the cause. Any suggestions? Thanks in advance for any help.