AVRDragon returning from debugWIRE

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

Ok, before I start, just let me say, I've found the 'Exit debugWire' button on the Dragon control panel when finishing up a debug session.

What I'd like to know, is what exactly AVRStudio is doing when I press this button.

Why? Cus I want to understand how it does what it does.

You see, from what I've read, when the target chip's fuse is set for DWEN the only viable way to get it reset is to use HVSP (Tiny25). So I tried that, and it didn't work! The chip was on my target board with a full 6 pin ICSP cable and power supplied from the Dragon. (I've not populated all the headers/Zif on the Dragon yet, that's this afternoons project).

So, if I can't reprogram the fuse using HVSP off board, how the Dickens does AVRStudio do it?

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

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

Quote:
You see, from what I've read, when the target chip's fuse is set for DWEN the only viable way to get it reset is to use HVSP (Tiny25).

The purpose of this board is to frighten new users.

You can recover from debugWire mode by connecting all the ISP wires and doing a 'avrdragon.exe -dATtiny25 -W'
Or by starting a Debug session in Studio, and choosing the 'disable debugWire' option.

You should never need to do HVSP unless you choose to blow the RSTDISBL fuse.

If you are wise, you never blow the RSTDISBL fuse.
Unless you never want to re-program the chip again. i.e. a finished project.

I would not bother populating the other headers.
I would bother to buy a wall-wart to power your external board. And never use the Dragon for external power.

No. I have no idea what the 'disable debugWire' command does. I suppose that I could put a Logic Analyser on the lines. Or ask Google.

I just accept that something works if you simply obey the instructions!! Who cares what happens inside the chip?

David.

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

Thanks for your insights and the tip about the command line option.

Quote:
Who cares what happens inside the chip?
Well, it's not inside the chip, it's the Dragon sending the signals (or is that what you meant?). And, to answer your question, I do :)

Could you expand on the comment about not supplying power through the Dragon? Why not? Is it simply that a problem on my target board could fry the Dragon, or is there something more sinister behind your remark?

Oh, and as to why I want know... I prefer to use my Mac as a Mac not as a Windows emulator, so, by hook or by crook, I'd like to debug (and program) with the Dragon natively in OSX.

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

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

I always take the view that the Dragon is an excellent dWire or JTAG debugger.

It will do lots of other things. It is a bare pcb that needs treating with care.

I use my Arduino to power external circuitry. I try to be careful because the power comes via the PC, and is a lot more expensive to mend a PC.
I also power external boards via a STK500. I am probably very cavalier with the STK500. You can abuse it without penalty. This certainly does not apply to the STK600. I have a destroyed one to prove it.

If you are careful with the Dragon you will probably be ok.

Regarding the Mac: you will need to emulate Windows to run the Atmel tools. I have no idea how well this works.

I would try any 'recovery' with the Atmel tools on their native platform. When you have verified that everything works ok 'native', you try the same things under emulation.

Yes. I would guess that '-W' does nothing very complicated. But hey-ho, if it works why should I worry?

David.

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

Thanks David.

Quote:
Regarding the Mac: you will need to emulate Windows to run the Atmel tools. I have no idea how well this works.

Yes, indeed. It actually works VERY well! That is, using Parallels VM and XP. But as noted, I far prefer OSX as I'm subjected to M$ every working day as a Software Engineer (*ix and M$ .NET) and have been, all my working life :) OSX is just a delight to work with. Darwin is, after all, just unix, and Aqua is a shiny interface ;)

Actually, your idea of powering external boards via the Arduino is so good, I think I'll knock up a separate regulated PSU with 5/3.3v output's for all my 'experimentation'.

Thanks again!

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!

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

If you are creating a supply, I suggest that you set the overload / current-trip to a sensible level.

Otherwise accidents can cause some damage. Most 7805 or similar shutdown at fairly substantial currents.

David.

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

I've got some 200ma polyfuses, I don't anticipate needing more (current) than that for the present.

--greg
Still learning, don't shout at me, educate me.
Starting the fire is easy; the hardest part is learning how to keep the flame!