JTAGICE MKII will not connect to Butterfly

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

I know this has been addressed many times before but nothing seems to work. I have had a JTAGICE MKII connected to a Butterfly and have been successfully programming and debugging with Studio 4.17. Fired it up this morning and I get the dreaded "Failed to identify target" message. Nothing has been changed since it last worked (not knowingly at least).

After selecting the "Connect to the selected AVR programmer" icon the Main tab shows the correct MCU (Atmega169) and Programming Mode and Target Setting is set to JTAG. The HW Settings tab shows VTarget = 3.9v (external supply) or 2.9v (battery).

Attempts to erase the device, read signature and starting debugging all say "Failed to identify target".

Now what?

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

Quote:
the Main tab shows the correct MCU (Atmega169) and Programming Mode and Target Setting is set to JTAG.
That means nothing, it's just the last settings remembered.
Quote:
read signature and starting debugging all say "Failed to identify target".
But I'm sure that there is another prompt after that about using the reset pin? Is the reset line connected to the JTAG header? If you had any code disabling JTAG it would produce the same error.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

as a double check you could connect the ICE through ISP. Then check if you can connect and if so check if any fuses have been set wrongly.

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

Quote:
But I'm sure that there is another prompt after that about using the reset pin?

Yes, the full messege is "Failed to identify target. Would you like to retry with external reset enabled" Selecting YES fails and suggests checking that the JTAG header is installed correctly (it is keyed so there is only one way to connect it) and to "make sure that the JTAG interface of the target device is enabled". I think that means the JTAGEN fuse is selected. For some unknown reason that fuse is not set (quite sure it was previously) and since I cannot connect to the chip I cannot set it.

Quote:
Is the reset line connected to the JTAG header?

Yes, this is an unmodified Butterfly.
Quote:
If you had any code disabling JTAG it would produce the same error

No code disabling JTAG. Code has not changed since it last worked.

Quote:
as a double check you could connect the ICE through ISP.

How do I do that with the JTAGICE?

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

Select Tools -> Program AVR -> Connect. You must connect to a ISP connector using the supplied squid cable.

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

I tried using the 10-pin squib cable (no 10-to-6 cable came with my JTAGICE). Connected as follows:

BFLY ICE
ISP JTAG
1 3 (TDO)
2 4 (VTREF)
3 1 (SCK)
4 9 (TDI)
5 6 (RST)
6 2 (GND)

Selected Connect -> Main -> ISP Mode
Set frequency to 6.48KHz (last running clock was 32.768KHz)

Under the HW tab VTarget now reads 0.00v (was approximately 3v with JTAG). When the Fuses tab is selected an ISP error occurs.

Everything was working when I tried to reprogram with JTAG. Now what?

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

Quote:
Set frequency to 6.48KHz
Set it at 125KHz and leave it there for now. If it reads 0.00V then the VTREF or ground pins need to be re-checked.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Thanks for your inputs. Still no luck. Starting to believe the MCU is dead.

Attached an external supply and now after Connecting to the Selected AVR Programmer the voltage reads 4.0v in the HW Setting tab. In the Main tab I selected ISP Mode and set ISP Frequency to 125KHz (also tried 6.48KHz) and clicked Write to set it (is that correct?).

Selecting the Fuses tab shows the ISP Mode Error window. It suggests:
1 Verify device in correct socket [OK - this is an unmodified Butterfly]
2 Verify ISP cable is properly connected {OK if my previous post showing pinouts is correct - please check for me]
3 Check ISP programming frequency is well below 1/4 device frequency including CKDIV and CLKPR [??? - don't know what is meant by "device frequency". 8MHz? last working program set frequency to 32.768KHz?]

The JTAGICE mkII Quickstart Guide says the ISP interface must be set by disabling debugWIRE in Debug -> JTAGICE mkII Options -> Connections. But the JTAGICE mkII Options is grayed out. What should be done here?

If someone thinks they know the solution please give me the step-by-step details. Maybe I am missing something simple (or the chip is DEAD).

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

Quote:
by disabling debugWIRE in Debug
There is NO DW in the Mega169. The cable is wired correctly according to the manual.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly