debugWIRE on a Nano, RESET-EN solder bridge

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

Proud recipient of a new ATMEL ICE today. Been using AS7 in simulator mode for a while on the 328p. Now i want to use the ICE to step through my code live on a Nano. 

 

been doing some reading on this forum and found a post from a few years back about using the debug wire through the 6pin. The post was using the UNO, 

https://www.avrfreaks.net/forum/a...

 

I am trying to find where to make the bridge. Do i just have to get rid of the cap on the reset circuit? or do i have to pop the resistor too?

 

I have the Eagle file and schematic and i found the C2 cap identified in the attacked photo with a clip from the schematic also. 

 

Am i going in the right direction, just popping off Cap 2?

 

 

Attachment(s): 

This topic has a solution.
Last Edited: Wed. Feb 7, 2018 - 03:14 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to AVRFreaks.

 

Yes C2 needs to be removed.

 

Your nanoschematic image appears to indicate that the reset pullup resistor R4 has a value of 350 ohms ("0.35" kilohms). I think that this may be too low a value for the ICE to be able to pull low. Certainly try with it still installed but if it does not work, I would suggest replacing it with a value of say 10K.

Ross McKenzie ValuSoft Melbourne Australia

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

The Atmel ICE User Guide section 9.2.2 debugWIRE OCD says the following:

 

When designing a target application PCB where debugWIRE will be used, the following considerations must be
made for correct operation:
● Pull-up resistors on the dW/(RESET) line must not be smaller (stronger) than 10kΩ. The pull-up resistor is
not required for debugWIRE functionality, since the debugger tool provides this
● Connecting the RESET pin directly to VCC will cause the debugWIRE interface to fail, and may result in
hardware damage to the Atmel-ICE
● Any stabilising capacitor connected to the RESET pin must be disconnected when using debugWIRE,
since they will interfere with correct operation of the interface
● All external reset sources or other active drivers on the RESET line must be disconnected, since they may
interfere with the correct operation of the interface

 

So indeed, the pull-up resistor must be greater than 10k, or removed completely, and any capacitor on the reset pin must be removed

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

I'm not sure that the capacitor must be removed.   I assume that a "stabilizing" capacitor connects between reset and ground.  But this cap is connected to the DTR of the USB-serial IC.  The DTR line high when inactive on the USB side of the cap.  The ICE has to be strong enough to pull the charge off the cap (and pull the reset line to logic low.  Probably best to test both with and without the cap, but I suspect that having it in place (and connected to a logic high on the other side from the reset) won't make a difference.  If so, then it's one less piece of exacting tweezer/magnifier/solder pencil work to do.

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

thanks for the quick response.

 

it worked, 1st time!!

 

I popped off the cap and the 1k resistor. Temporarily soldered 1 leg of a regular wire resistor to one pad and ran it up top to 5v(see pic). The manual i am reading says i should be using a 47k resistor (see attached).

 

The way i am reading what your 9.2.2 says is either no resistor because the ICE has an internal "OR" anything over 10k, and nothing in between. I guess it is like pulling up the I2C lines, it all depends on finding the happy medium where the signal is best?

 

 

 

In that other thread, what does this mean? I know how to stop the debugger, what is Exit DW?

REMEMBER!! Whenever you finish with debug, in 5 minutes, 5 days or 5 years EXIT DW from within a debug session to get normal programming functionality back.

 

frank.

Attachment(s): 

Last Edited: Wed. Feb 7, 2018 - 03:09 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the Debug tab of AS7, there is a selection "Disable debugWIRE and Close" that is only active during a debugWIRE session. If you forget to click it, the chip remains in DW mode...

David (aka frog_jr)

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

I seem to remember that the DTR capacitor had to be taken out of the circuit too, but I am not positive.  I thought one of the Arduinos had a solder pad to take that cap out of the circuit for debugging.  It would be interesting to know if debugWire works with the cap in place, if someone is up for doing that experiment.  I always just remove it since I dont use the Arduino IDE and I think that cap is part of the restart after downloading to flash using USB, if that makes any sense.  David probably knows.

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

If the pads were facing up, could solder a female header to it so a wired capacitor could be inserted as a jumper. This way it could be used as designed or with the debugger.