As mentioned in my previous post, AVI Dragon’s SPI pins in debugWire interface have to be disconnected during debug run in order to properly run an application that uses SPI / USI. I also noticed that the Dragon dominates RESET pin, too. In my project, I’m resetting target chip from Arduino. The Dragon is killing this functionality as well. This makes me quite uncomfortable with my development work, so I’ve enhanced the switch I made on bread board previously, and made a helper device. It’s nicely working. I named it “Dragon’s Tail”.
What needs to be done is to make three switch modes:
|Mode Name||Use this mode when you||Reset Pin||SPI Pins|
|Initial||Run application without any influence from Dragon||disconnected||disconnected|
|Debug||Execute debug run from Dragon||connected||disconnected|
|Programming||- Program the chip|
- Enter debug mode
- Exit debug mode
I revised the switch circuit as follows. The circuit starts with the initial mode on startup. The mode rotates on pressing the button such as initial -> debug -> programming -> initial and so on.
I put the circuit on a 1.5 inch x 1.2 inch board. It nicely fits on top of Dragon.
But the bottom side is a little messy :-)