Dragon problem with program mode

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

I don't have any problems using the Dragon for debugging, but I can't seem to be able to get it to work as a programmer. The main problem is that it can't read the device code: with a Tiny45 target and the PP/HVSP mode it reads the signature as all zeros. With ISP selected I get an error message.

Leon Heller G1HSM

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

IS this programming being done on the Dragoon itself, in the proto type area, or on a board? Tiny45 powered by dragoon during programming?

Edit: If programming on Dragoon in ziff socket or something or powering from dragoon, the dragoon seems very susceptible to length of wires, wires just long enough to jumper the headers on board and I never have problems. If the MCU has its own power supply on a separate board I can use much longer wires (8"-10").

Last Edited: Fri. Mar 26, 2010 - 12:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It may have got itself into debugwire mode.

Try 'avrdragon.exe -W'

David.

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

Quote:

It may have got itself into debugwire mode.

But does that matter if you use High Voltage? I thought the whole point of HV was that you could "get it back" whatever state it was in?

(I've certainly contacted 168's on an STK500 with HV and I think all that was "wrong" was they were in dW mode)

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

The board is connected via a short cable, about 15 cm.

Programming the fuses doesn't work, either. I get the same error message:

P.../HVSP Mode Error.

I tried avrdragon -W but it expects a device type, and none of the ones I tried worked. I tried tn45, ATtiny45, attiny45, etc.

Leon Heller G1HSM

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

Are you sure?

avrdragon.exe -d ATtiny45 -W 

should be recognised.

I have only used JTAGICEmkII.exe but I would assume the dragon works the same way.

n.b. You must have the ISP lines connected to enter / leave dW. Once in dW, the ISP lines can be removed.

David.

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

It didn't like that, I got:

C:\Program Files (x86)\Atmel\AVR Tools\AvrDragon>avrdragon -d ATtiny45 -W
avrdragon.exe v1.0.2 Copyright (C) Atmel Corporation 2006-2008
Regenerating part cache file...
Failed to load .cac file. Unable to determine supported devices.
Use '-h' or '-?' for help.

I just tried a Tiny2313 again. It appears to write to the fuses if I only select the oscillator (ext. crystal 8 MHz-) but if I select anything else like BOD, it fails. In fact, it's not really writing anything, it already had that setting so it verifies OK.

I'll try Atmel support and see what they say about it.

I don't get problems like this with PICs, or any other MCU!

Leon Heller G1HSM

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

Silly question but you have got it wired as per the manual:

Attachment(s): 

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

No, I didn't add any of those connections. That could be the problem. I'll solder the HV connector and make up some jumper cables.

That might be OK for the Tiny45, but the Tiny2313 is a SOIC, and I can't plug it into the ZIF socket. There must be another way to fix it.

It would be easier if I could get David's technique to work. I got the same error with the Tiny2313.

Leon Heller G1HSM

Last Edited: Fri. Mar 26, 2010 - 02:14 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Leon,

But is the device in a socket on the Dragon board (I guess you may have mounted a ZIF?). If you are actually trying to HVSP it in circuit then those A..F on the ISP and HV headers need to run to the given pin numbers on the device as shown on the device header.

Like the STK500 this is why HV programming always seems like such a fiddle-faddle to me. The STK600 is MUCH more intelligent in that it hides all this signal routing nonsense in the routing cards that make up the target socket "sandwich" (but, of course, you pay for that privilege!)

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

I've got both the devices on PCBs, with a six-pin ISP header. The Tiny45 is socketed but the Tiny2313 is a SOIC. I added the ZIF socket to the Dragon when I first got it a couple of years ago, but I've never used it.

I can plug the Tiny45 into the ZIF socket, but I don't see how I can make those connections to the Tiny2313 on my target board. It might be easier to simply replace the chip.

Leon Heller G1HSM

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

Quote:

It might be easier to simply replace the chip.

That often seems to be the case when you hit the HV wall!

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

But if you have the Tiny2313 ISP header and the Tiny45 ISP header then you never have to move anything.

The caveat is of course 'DON'T blow the RSTDSBL fuse'.
It is certainly easier to just replace chips.
To unsolder and put into a Dragon, and resolder is more than my life is worth.

I have used debugWire on both Tiny85 and Tiny2313. It works fine. You have to put the ISP lines back when you re-enable ISP.

You had of course noticed that the Tiny45 uses some strange ISP pins. You have to do several jumpers on the STK500. But you would have already hard-wired these pins to your ISP header.

David.

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

The strange thing with the Tiny45 is that I have the ISP connections on my PCB, so I should be able to get into ISP mode. I can't find a command for it, though.

I just put a brand new chip in the Tiny45 board and I can read the signature on that, program the fuses and program my code into it.

Leon Heller G1HSM

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

Double check your ISP routing. You need PB0, PB1, PB2, /RESET. A virgin has its own (1MHz) clock. It will come out of the box ready for ISP.

I do not use a Dragon. Surely it ISP's all other chips ok.

Do you have a JTAGICEmkII to try?

David.

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

I've got one of the old ones, it only has a 10-way JTAG connector.

I've got PB0, PB1, PB2 and /RESET connected to the ISP headers on my Tiny45 and Tiny2313 PCBs.

Leon Heller G1HSM

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

Try lowering the ISP frequency to 125 kHz.

Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.

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

I've found the solution! It's AVR Dragon Options > Disable debugWire. I now vaguely remember using it a long time ago, when I last did some AVR development. Atmel should mention it in the Help. I can now use program mode on both the Tiny45 and Tiny2313.

Thanks for the suggestions.

I have other problems using the Dragon with a new Mega32 board that I was sent for review, but those are completely different.

Leon Heller G1HSM

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

Quote:
I've found the solution! It's AVR Dragon Options > Disable debugWire.
Yeah. It only gets mentioned once a twice a week here. :wink:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

The external clock problem seems a lot more common. I've never fallen for that one, at any rate.

Leon Heller G1HSM

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

If it's of any consolation I fall for the DW trick from time to time myself and I am the "Dragon master". :lol:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly