Dragon Fails To Program. AGAIN

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

OK, this is a reoccurring problem now and its beginning to really get on my nerves.

I will be working throughout the day writing code and programing my avr without any problems when all of a sudden programming will fail. I retry, restart, it fails. EVERY TIME.

To try and correct this problem I do the following:

In windows device manager I remove avrdragon and windriver
Unplug dragon
goto add/remove programs
goto avr studio and run modify and de-select the driver
restart windows
I then re install the driver from add/remove programs
device manager list the avrdragon and windriver
restart windows
attempt to program again, FAIL.
try different usb ports, FAIL.
re-install avrstudio4

I have tried plugging the dragon into powered usb hubs, rear usb ports, front usb ports and re-installing the drivers and even re-installing avr studio 4.18

The programming interface in studio detects the chip voltage and can change the ISP frequency but fails to enter programming mode on any read or write operation. Cannot read device signature, erase, read/write from eeprom/flash, nor can I read fuses.

This is the third time this has happened in a few months and last time I had to remove windows 7 and re-install windows xp to fix the problem. This problem also happened on my windows xp laptop and it still to this day cannot enter programming mode.

Dragon programs fine on a brand new chip (ATTINY25V) then on next program FAIL. Change to a different chip (ATMEGA164P) and it FAILS.

I have even tried lib-usb and the first time this happened that solved the problem for about two months and then the second time I tried to reinstall the drivers windows did not recognize any usb devices anymore and guess whats usb! EVERYTHING... reinstall windows again...

I know this is a problem for more than just me, I also know their is nothing wrong with the dragon as it still works. Does anybody know a way to fix this????

EDIT:

I have submitted a support ticket for this issue before with an even more detailed list of steps I took and they gave the textbook answer of "was the checkbox checked during install" and its like talking to a robot.

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

Did you even happen to use debugWire for debugging?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

You are obviously communicating successfully with the Dragon on the USB. You can read and write commands like VTG and ISP frequency.

It is your SPI comms from the Dragon to AVR that is failing. And you have the usual culprits:
1. You are in debugWire mode.
2. You have set an inappropriate AVR clock fuse.
3. You have an AVR clock, but your ISP freq is inappropriate
4. You have some external hardware on the ISP lines.

I would assume that you have proper soldered headers and reliable cables. But there is always:

5. Failure of clothes pegs / sticky tape / rubber bands / breadboard to maintain reliable electrical connections.

I think it highly unlikely that your program installation should collapse, unless of course your PC is riddled with viruses.

David.

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

ISP cable longer than 6"?
Dragon still on the black anti-static foam?
Dragon line-deriver IC(s) killed?
Use of junk OS like Windows 7 x64?

Stealing Proteus doesn't make you an engineer.

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

Hey,

js - I had been using debugWire yesterday but I had it turned off and had programmed the chip 3 or 4 times without problems.

david.prentice - I have not touched the tiny's fuses, defaults are fine for my needs. I have tried every ISP freq avalible. Their is no external hardware on the Tiny.

ArnoldB - I have the dragon in a hammond case all secure and protected, I also have JTAG/ISP6/ISP10/dW headers made all 5" long. I have used every cable last few weeks as I have two AVR projects on the go and everything works wonderfully until suddenly I can't enter programming mode anymore.

Well I just tried it over again, didn't touch a single thing just plugged the dragon in and went to studio and it will program the tiny. I only have one 1uF cap on my supply rail but it sounds as if theirs some capacitive coupling across the comm channels on the dragon.

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

Post the schematic of your target board. You might have a design problem.

I don't have any problems using Win7 x64 with my Dragon.

Leon Heller G1HSM

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

Well I don't know what was up but its working fine again, programmed all night without a single glitch.

leon_heller - Theirs no way my cct is wrong. Its a tiny25 8pin device and the programming troubles where with only the ISP wires and Vcc/Gnd. And I have not touched anything and its working again so whatever I guess.

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

And like a true pain in the neck I was working all night with no problems, come in this morning turn on my power supply and plug the usb cable in and no communications again.

Nothing has changed since yesterday when it worked, didn't even close avr studio.

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

Quote:

Nothing has changed since yesterday when it worked, didn't even close avr studio.

A VERY bad idea! I run Studio on a laptop. When I'm finished I just close the lid which hibernates (if a desktop it may eventually hibernate too). When I start up again all programs restore correctly APART from Studio. Often it's locked with a blank screen or if it does apparently recover and I File-Exit I later find that Task Manager shows a copy of avrstudio.exe (sometimes several) still in memory and it behaves "very oddly".

So I'd ALWAYS File-Exit from Studio before the PC goes to Standby let alone Hibernates.

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

My desktop never goes to sleep or hibernates, I have set it up to never do so.

I have solved the problem though. Their is an error somewhere that causes the programming of the chip to fail and the chip refuses to reset!

This is what I did to fix the problem:
-------------------------------------------------------
Installed libusb-win32-filter from:
http://sourceforge.net/projects/libusb-win32/

Replace libusb0.dll in C:\WinAVR\bin with the one now installed in C:\WINDOWS\system32

Open a command line and type:
avrdude -c dragon_isp -P usb -p t25 -v

It will try isp and fail, will then try dw and fail. Run the same command again. isp will fail, dw ill say:

"Restart avrdude without cycling power to mcu"

Run the command again and all my chips info is displayed!!!
-------------------------------------------------------

Now this happened and I happened to be using debugWire on this chip the previous day but this same problem has happened on my Mega164p when I was using isp and on another occasion when I was using jtag. Im thinking maybe the dragon I have has a problem releasing the chip at the end of a programming cycle randomly and it causes the mcu to lock up.

Either way I'm very glad to have it back its been 3 days on a project that should have been one.