AVR Dragon and mk2 not working

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

Hello guys....finally i am posting sumthin...read this forum and got help for long

I work for a company and i am stuck badly.Also there are not many avr experts around.
I have stk500, jtag mk2 and avr dragon.
Avrstudio recognizes mk2 and dragon but cannot identify signature bytes....so cant read fuses or program.
But everything works well with stk500.
I am tryin to program a piece of hardware which is alrite because stk can program it thru isp but dragon and mk2 cant.
Strange thing is dragon and mk2 both stopped working at the same time.....

Also one more observation. Dragon reads the signature bytes for the first time....then from second time onwards it reads 0x00, 0x01 ans 0x02.

I dont understand wats happenin

:roll:

Need some freak help here....asap!!!!

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

You need to describe what connections you make, and what commands you issue, in detail. Theres not much to go on in your description above.

A statement of what AVR model we are talking about might help a bit.

Can you read the fuses with the STK500? If so, what are their values? (Hypothesis being that a fuse enabling debug capabilities for AVRJTAGmkII/Dragon is not set.)

BTW:

Quote:
read this forum and got help for long

Quote:
Joined: Jan 27, 2010

:?:

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

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

I am using ATmega 88. Programmin thru ISP.

Fuse status:(STK500)
Reading fuses .. 0xF8, 0xDD, 0xE2 .. OK!

With Dragon:

Reads fuse bytes correct the first time.
But when i switch tabs...it doesnt again.

With mk2:

It just recognizes the programmer but cant read fuse bytes or signature or anything

BTW:

Quote:
Joined: Jan 27, 2010

Quote:
Follower: ... .., 2007

I have been thru many of yur posts.
So i kno replyin to yur sarcastic tone is worth it.

;-)

Pls reply asap Johan....i need help

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

Ya n one more thing

I have been using this mk2 and dragon with same connections since quite sometime....i have no doubt in connections.....also how do i kno whether its dead

Although it will be quite a coincidence for both dragon and mk2 to fail at the same time whereas stk works perfect

:roll: :roll: :roll:

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

Quote:
both dragon and mk2
Both share the USB driver??

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Both dragon and mk2 are using their respective drivers

In terminal mode, while using stk i get this:

//********************************************

C:\WinAVR\bin>avrdude -c stk500v2 -p m88 -P com1 -v

avrdude: Version 5.3.1, compiled on Jan 1 2007 at 14:25:19
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "C:\WinAVR\bin\avrdude.conf"

Using Port : com1
Using Programmer : stk500v2
AVR Part : ATMEGA88
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff
flash 65 6 64 0 yes 8192 64 128 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : STK500V2
Description : Atmel STK500 Version 2.x firmware
Programmer Model: STK500
Hardware Version: 2
Firmware Version: 2.10
Topcard : Unknown
Vtarget : 5.2 V
Varef : 5.1 V
Oscillator : 3.686 MHz
SCK period : 10.9 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e930a
avrdude: safemode: lfuse reads as E2
avrdude: safemode: hfuse reads as DD
avrdude: safemode: efuse reads as 0
avrdude: safemode: Fuses OK

avrdude done. Thank you.
//********************************************

And for mk2 i get dis

//********************************************

C:\WinAVR\bin>avrdude -c jtag2 -p m88 -b 9600 -P com1 -v

avrdude: Version 5.3.1, compiled on Jan 1 2007 at 14:25:19
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "C:\WinAVR\bin\avrdude.conf"

Using Port : com1
Using Programmer : jtag2
Overriding Baud Rate : 9600
JTAG ICE mkII sign-on message:
Communications protocol version: 1
M_MCU:
boot-loader FW version: 255
firmware version: 4.38
hardware version: 0
S_MCU:
boot-loader FW version: 255
firmware version: 4.38
hardware version: 1
Serial number: 00:b0:00:00:55:15
Device ID: JTAGICEmkII
AVR Part : ATMEGA88
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 5 4 0 no 512 4 0 3600 3600 0xff 0xff
flash 65 6 64 0 yes 8192 64 128 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : JTAGMKII
Description : Atmel JTAG ICE mkII
M_MCU hardware version: 0
M_MCU firmware version: 4.38
S_MCU hardware version: 1
S_MCU firmware version: 4.38
Serial number: 00:b0:00:00:55:15
Vtarget : 3.2 V
JTAG clock : 891.7 kHz (1.1 us)

avrdude: jtagmkII_initialize(): part ATMEGA88 has no JTAG interface
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.

//********************************************

Waitin for yur rep John.....thnx for yur interest
Ya n can you tell me how can i ensure that mk2 is not dead??

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

Quote:
C:\WinAVR\bin>avrdude -c stk500v2 -p m88 -P com1 -v
Oh sorry I thought you were using Studio. I'm out of the race.

It looks like you are trying to program the chip in JTAG mode which does not exist in the M88.

Seems like you are using the JTAG Mk2 with RS232 and not USB.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

If you want to use the JTAGICE-mkII for ISP programming you should probably use '-c jtag2isp'.

And '-c dragon_isp'

Since you seem to be running Windoze, why not use Studio to verify that the dragon and mkII both work properly.

Then you can try using avrdude with the knowledge that your programmers are ok. It is you who has to get the syntax correct.

David.

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

@ js:

Quote:
Seems like you are using the JTAG Mk2 with RS232 and not USB

Yes actually i tried a lot on Studio but to no result.
So i tried using avrdude so that i can atleast see something and try some another way out......But i was wrong......i get yur point

@david

Quote:
Since you seem to be running Windoze, why not use Studio to verify that the dragon and mkII both work properly

I have tried many things on studio but could not get anywhere.

Some more observations if yu guys can comment on.....USB interface on mk2

On the Board tab,
VTarget = 3.2
VTarget and ARef sliders are disabled.
ISP freq = 125.kHz

Revision:- (I had upgraded the firmware in one of the several attempts to make it work)
Hw: 0x0001, Sw: 0x0426 0x0426

Getting revisions... OK!
Reading target voltage .. OK!
Getting ISP frequency parameters.. SD=0x06 .. OK

Cannot read fuses and lock bits tab.

Also the LED status(0FF) shows that mk2 is connected properly to Studio.
This led turns green for half a sec when i try to issue any commands and then again turns off.

Any suggestions?????

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

The mkII comes out of the box with USB and the Studio USB drivers.

So plug in the mkII USB cable and nothing else.

Connect via Studio.

I get:

Detecting on 'Auto'...
JTAGICE mkII found on USB
Getting Revisions...   OK!
Getting Revisions...   OK!
Getting ISP frequency parameters... FAILED!

Disconnect and plug in your ISP cable, and I get:

...
Getting ISP frequency parameters... SD=0x06 .. OK!

In the Main tab, make sure you set your AVR Device. Then click 'Read Signature'

You then want to investigate all the other tabs of the Studio Programmer Dialogue.

Report back on how you get on.
The Status is always displayed in the bottom panel of the dialogue.

David.

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

Connected mkII with Studio

I get:

Detecting on 'Auto'...
JTAGICE mkII found on USB

I dont get the remaining....

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

Just a moment folks. If AVR Studio is used in Windows to connect to Atmel's USB interfaced tools then the Windows USB driver that is used is called "Jungo" and is (optionally) installed when you first install AVR Studio.

avrdude on the other hand is build against an open source Win32 USB supporting lib called libusb. This uses a different low level driver for the USB communication.

The libusb and Jungo USB drivers are mutually exclusive. You cannot have both installed at the same time. So to use avrdude (via USB) in Windows you first need to remove Jungo. To use Studio you have to remove libusb. You cannot expect both to work.

Personally I see no point in trying to do battle with the slightly old-school command line interface of avrdude when you could be using the GUI based interfaces in Studio. So if you use Windows and Atmel USB tools then use Studio to drive them and if you really need to script operations in a batch file use the jtagicemkii.exe and similar command line tools to do it - not avrdude.

IMHO.

PS As I do, you CAN have Studio+Jungo but then still use avrdude for non-USB interfaced operations (like STK500)

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

Hey thanx clawson for the info..

I am no longer using avrdude but still mkII doesnt seem to work.

As i said Studio cannot get revisions....are these hardware and software revisions??

It is same with dragon.

Detecting on 'Auto'... 
Dragon found on USB

I am badly stuck ppl......please help

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

Which version of Studio are you using?
What is your JTAGICE serial number?

I am surprised that you do not get the 'Revisions' messages.

On the HW Info tab, I get Hardware 0x01, Firmware 0x0606

David.

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

clawson wrote:

Personally I see no point in trying to do battle with the slightly old-school command line interface of avrdude when you could be using the GUI based interfaces in Studio. So if you use Windows and Atmel USB tools then use Studio to drive them and if you really need to script operations in a batch file use the jtagicemkii.exe and similar command line tools to do it - not avrdude.

IMHO.

A command line interface isn't (shouldn't) be a "battle".

It depends on your knowledge and skill set.
I've been doing embedded work and writing my own makefiles for 25+ years.
I will admit that GUIs are really nice for some things, but for me,
I can still do many things faster and easier especially for more complex build environments than what is possible with GUI based tools.

My AVR makefiles even have rules that can automatically calculate and set fuses based on symbolic FUSE names using avrdude under the hood.

That's the beauty of having a commandline based core set of tools.
Those that want a GUI can opt for that, those that want/need additional capabilities, can bypass the GUI.

--- bill

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

Luddite :lol:

(me too actually. I still use "xcopy *.* dest /her" in DOS rather than try to work out how to do that in Explorer! In Linux I'm more at home with sed and grep than any of the GUI stuff - though I have to admit I like Synaptic and apt-get equally)

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

Quote:
Which version of Studio are you using?

AVR Studio 4.13.528

Quote:
What is your JTAGICE serial number?

B000005515

Quote:
I have tried many things on studio but could not get anywhere.

Some more observations if yu guys can comment on.....USB interface on mk2

On the Board tab,
VTarget = 3.2
VTarget and ARef sliders are disabled.
ISP freq = 125.kHz

Revision:- (I had upgraded the firmware in one of the several attempts to make it work)
Hw: 0x0001, Sw: 0x0426 0x0426

Getting revisions... OK!
Reading target voltage .. OK!
Getting ISP frequency parameters.. SD=0x06 .. OK

Cannot read fuses and lock bits tab.

One more thing i noticed is there is an error always while the status is "Enter Programming Mode"
"Getting revisions" works well on different tabs

:-|

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

Studio 4.13 is fairly elderly now. It may be time to upload the current version (and service pack SP1)

If you want to get this resolved, please say where you are in the world. It may be as easy to talk you through the steps on the phone. Otherwise we can do it via forum posts.

David.

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

I am from INDIA david. Thnx for yur concern.

How can we talk?? Gtalk??

Downloading the new version...

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

Exchanging postings on the forum is probably the easiest then.

So download and install the current Studio. It is 120MB so I hope you have a fast internet connection.

Let us know if or when you are ready.

David.

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

Done.....

Detecting on 'Auto'...
JTAGICE mkII found on USB
Getting revisions...      OK!
Getting revisions...      OK!
Getting ISP frequency parameters.. SD=0x06 .. OK

READ SIGNATURE

<br />
Setting device parameters.. OK!<br />
Entering programming mode.. FAILED!<br />
Leaving programming mode.. OK!<br />
/code]</p>
<p>Same status appears in lock and fuse bits tabs.</p>
<p>In "Hw Settings" tab, VTarget is 3.2V and only "Read" tab is active.</p>
<p>Status:</p>
<p>[code]<br />
Reading target voltage ..      OK!<br />

wat next...

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

As I understand it you possess a regular STK500 board. Presumably with a spare AVR chip to place in the STK500.

If it is a JTAG mega AVR, place the JTAG adapter on the EXPAND#2 header of the STK500. Photos in the JTAG-2 online help.

Connect the JTAGICE-mkII to the adapter.

Then try and connect via Studio.

If you are using a non JTAG AVR, you use the 6pin adapter and connect to the correct colour 6pin ISP header on the STK500. Note that the photo refers to mega168 AVR with the GREEN header. A mega32 would use the RED 6pin header.

Ditto. For connect via Studio.

Obviously I assume that you have checked the STK500 programs the onboard AVR first.

David.

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

I have Atmega88p on a hardware provided by client.

Also i have spare atmega88 and 48 which i tested on stk500 hardware (connections are correct surely).

But the results are same.....

Is it dead??

I will be able to reply on monday as i am leaving my office now.....thanx a lot man.....yu are showing great interest

Wat else can i do???

Can atmel guys help??

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

So install a virgin atmega88 in the green SCKT3200A2 socket. The JTAGICE-mkII 6pin adapter to the green SPROG2 header. Everything should match the photos in the online Help.

All the other STK500 jumpers should be in default position. (remove RESET jumper when you try debugWire)

With luck, your mkII should come to life. So should the Dragon.

Then all we have to do is debug your external pcb.

David.

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

Connected JTAG mkII to stk500 as shown.....but no results (similar response from mkII as with the custom hardware)

Also the hardware i have works fine with STK500

Any other suggestions??

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

So with all the default jumpers on the STK500.

1. The 6way ribbon between ISP6PIN header and green SPROG2. Connect via Studio to STK500. Set Vtarget to 5V. Set ISP frequency to 125kHz. Read signature, fuses etc.

2. The 6way adapter between JTAGICE-mkII and green SPROG2. Copy colour photo in online manual. Connect via Studio to JTAGICE-mkII. Read signature, fuses etc.

Please try these operations and report exactly what you find.

David.

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

Ok...will do it again and get back to you in half n hr

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

Sorry got a bit late....

Quote:
1. The 6way ribbon between ISP6PIN header and green SPROG2. Connect via Studio to STK500. Set Vtarget to 5V. Set ISP frequency to 125kHz. Read signature, fuses etc.

Everything works perfect...fuses are read, signature read is perfect, Vtarget is 5.1V and all goes fine

But in

Quote:
2. The 6way adapter between JTAGICE-mkII and green SPROG2. Copy colour photo in online manual. Connect via Studio to JTAGICE-mkII. Read signature, fuses etc.

I can set the ISP freq successfully but when i try to read signature....i get this as status

On connection


Detecting on 'Auto'...
JTAGICE mkII found on USB
Getting revisions...      OK!
Getting revisions...      OK!
Getting ISP frequency parameters.. SD=0x06 .. OK 

When i press read signature


First time (ISP = 6.478kHz)

Setting device parameters.. OK!
Entering programming mode.. OK!
Reading signature .. 0x62, 0xE8, 0x02 .. OK!
Leaving programming mode.. OK! 

2nd time

Setting device parameters.. OK!
Entering programming mode.. OK!
Reading signature .. 0xC0, 0xD1, 0x72 .. OK!
Leaving programming mode.. OK!

3rd time (ISP = 100Hz)

Setting device parameters.. OK!
Entering programming mode.. OK!
Reading signature .. 0x06, 0x89, 0x0A .. OK!
Leaving programming mode.. OK!

All incorrect values.

I changed ISP freq to 125kHz ....

Setting device parameters.. OK!
Entering programming mode.. FAILED!
Leaving programming mode.. OK!

And that big error msgbox.

In ISP settings lesser than 125kHz, fuses and lock bits are read but provide random values....

But in the older version of avrdude i.e. 4.13 it showed error for all freq values.....

Can you guess anything.....

I also tried with a fresh atmega48.....Cannot enter programming mode at all freq....

Also if you want, i can capture my desktop and email you a rapidshare video link....

Wat next.....waiting eagerly for yur reply....

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

I have a tiny2313 @ 8MHz sitting in my STK500. I tried the equivalent operations.

I first had to disable debugWire, and make the Tiny2313 available for ISP.

Then the STK500 reads signature perfectly normally.
Likewise using the JTAG-mkII, it reads signature quite safely at all ISP frequencies up to 2MHz. Even silly ISP frequencies like 6kHz still read the signature ok.

I presume that your mkII now reports Hardware Revision 1 and Firmware 0606. (HW Info tab in Studio)

Perhaps you can report the result of reading fuses in STK500 connection.

I cannot suggest any other tests for ISP. I can only guess that you have a broken flexi-ribbon or broken level-shifter chips.

Do you have a Mega16 chip to check the JTAG operation?

David.

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

No i dont have a Atmega16 chip....i will try to get it

Neways thanks a lot for yur support....it was really good to get response

Will try and talk to the atmel guys.....

Will update yu :-)

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

Quote:
In "Hw Settings" tab, VTarget is 3.2V
Quote:
Vtarget is 5.1V and all goes fine
I'm realizing more and more that I can't save the world!!

Obviously I have lost the thread of this thread....

Are you talking about 2 different boards? Also DO NOT mess around with the ISP frequency, set at 125KHz and LEAVE it untill it all works.

Are you just using the STK500 on it's own or plugged into another board?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly