ICE Disconnects when Jtag plugged in.

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

I've got a new board I'm trying to program.  Running Studio 7, ICE firmware up to date, programming a ATmega 2560.  The ICE shows up in the Device Programming window until I plug in the connector to the JTAG header, which disconnects the ICE. 

The design is copied from a different board I made that works fine.  The connections look the same:   Gerbers show JTAG connected to same places on boath board,  the voltages on the JTAG hearders are the same on both boards. There is a little difference in the noise (Noise on 5V and GND much lower on new board, but higher on the signal lines).

 

Center light is read on the ICE when JTAG cable disconnected. Green and red lights with Jtag cable.  Same behavior on old working board and new non-working board.

 

Same thing happens with a second ICE (and a second new board), so It appears there is something wrong with the board, but I can't figure out what.  Thinking it must have something to do with the noise.  Suggestions for what to try?

 

Thanks!

 

 

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

If you have a genuine ATMEL-ICE the 5x2 header is connected backwards.

 

Did you account for this "feature"?

 

David.

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

Got it working.

 

Yes. The connections are correct.  (yes I tried it both ways, and it is identical  on the board that works and the one that doesn't.)

 

Seems the new board has some high frequency noise issues.  Its got a isolated 28V to 12V DC-DC converter (then down converted with another to 5V).  Also have a Chassis ground. These are actually NASA requirements. When I connect all three grounds together I can program it. 

 

Figured it out after splitting a cable and started connecting one line at a time.  Just connecting one ground line (or just the 5V) from the isolated board to the ICE caused the ICE to disconnect!

 

A bit disappointing--payed a lot of money for design review and layout (looks really good to me), and there are clearly things wrong with the layout on the board that was working!

 

 

Last Edited: Tue. Jul 23, 2019 - 10:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

glewis wrote:
Just connecting one ground line (or just the 5V) from the isolated board to the ICE caused the ICE to disconnect!
Try a USB isolator?

P.S.

Couldn't find the word 'debug' in your posts; don't "need" an Atmel-ICE to program a mega2560.

 


https://olimex.wordpress.com/?s=%22USB-ISO%22

 

edit :

USB-ISO USB 2.0 Full Speed insulator passed all EMC tests in certified laboratory and now can bear CE mark! | olimex

 

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

Last Edited: Thu. Jul 25, 2019 - 04:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Didn't put an ISP header on the board.  Would have to solder some wires to test points.  Can you program via USB without a bootloader already programmed?

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

glewis wrote:
Can you program via USB without a bootloader already programmed?
Yes though the first burn is usually the bootloader (or bootloader plus built-in-test application for the PCBA manufacturer)

Pololu USB AVR Programmer v2.1 is one of several or many though would be via AVR ISP.

If AVR JTAG only then the alternate to Atmel-ICE is MPLAB PICkit 4 (beta in MPLAB X v5.20 for mega2560 though may work, set it to any AVR then can move it to Atmel Studio 7)

 

edit :

AVR Programmer Guide | USB ISP and Handheld AVR Programmer | Kanda (search for JTAG)

 

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

Last Edited: Thu. Jul 25, 2019 - 04:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

An alternate way is by a notebook PC on its internal battery or on its wall wart (of quality)

US PC cycle is three years; therefore, PC wall warts may become noisy and/or leaky.

Why this method is fraught with failure or worse :

Ruggedizing USB Connections for Tough Environments - Advantech B+B SmartWorx

USB is ubiquitous, it’s useful and it’s here to stay. But it isn’t inherently rugged or reliable. It’s up to you to make it that way.

[first two paragraphs]

There's been a thread or two here about destroyed Atmel-ICE power supplies.

Better to damage an Atmel-ICE than a PC.

Best is to isolate.

 

edit : abstract

 

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

Last Edited: Wed. Jul 24, 2019 - 02:07 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

glewis wrote:
...

When I connect all three grounds together I can program it. 

...

A bit disappointing-- ...

The system may be completely functional, other than the over-stressed Atmel-ICE, though there may be an EMC issue.

Technical Tidbit - September 2011

PCB-Chassis Ground Connections - Avoiding Pitfalls Due to Unintended System Resonances

by Douglas C. Smith

 

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

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

If AVR JTAG only then

another alternate is a USB JTAG bridge.

These are somewhat common and with a case; otherwise, one IC.

OpenOCD has the AVR JTAG programming instructions though doesn't have mega2560 (easy to add) 

 

>>> LURA <<<

HappyJTAG2 - JTAG AND SPI AVR8 interface 

[schematic is mid-page]

USB-Serial as JTAG Master - KBA224254 | Cypress Developer Community

https://sourceforge.net/p/openocd/code/ci/master/tree/src/flash/nor/avrf.c#l26

https://sourceforge.net/p/openocd/code/ci/master/tree/src/flash/nor/avrf.c#l64

 

edit :

some of these are very popular and inexpensive :

OpenOCD User’s Guide: Debug Adapter Hardware

 

edit2 :

Turtelizer 2 User's Guide

...

The Turtelizer 2 JTAG connector follows the AVR 10-pin layout.

...

via Turtelizer 2 ARM JTAG Dongle

Turtelizer 2 | Programmers & Debuggers | Embedded Development | egnite Shop

 

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

Last Edited: Thu. Jul 25, 2019 - 05:51 PM