can't get stk-500 to burn fuses in high voltage mode.

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

I have been programming with an avr usb burner for quite some time. I just recently got the stk-500 to do some high level burning. I was able to use the skt-500 in low voltage mode just fine. I use this guide.

http://support.atmel.no/knowledg...

To get high voltage mode working and it reads chips fine but when writing fuse bytes I get "one or more registers differs". In the avr-studio I just changed the interface option to HV instead of ISP. I can't find anything on the net in the matter. I'm able to program the memory just fine.
I notice try to change any of the fuses fail at verification, also the fuses it reads are also not what is on the chip.

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

Quote:
In the avr-studio I just changed the interface option to HV instead of ISP.
Are you talking about HVPP? This requires major rewiring of the STK500.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Yes HVPP, but Major? That link I posted above shows the wiring and jumper settings and i would not call it major. Though level of difficulty aside does that link not explain how to do it?

With the new wiring the ISP no longer works as expected but HHPV does when writing code to the chip. The issue I have is the fuse bits, they will not wright.

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

Quote:
Yes HVPP, but Major?
You MUST plug in 2 x 10 way ribbon cables as shown on the HVPP docs as well as setting the correct jumpers.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Right I have all of that and I'm able to write code to my chip, if the two 10 way ribbon cables are not connected then I can not, thus I'm to believe I have it correct.

My issue is I can not write the fuse bit, are you suggesting that must be a wire or jump error? If so then this error also implies the error allows me to write code to the chip. That just seem a bit wrong to me?

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

It does seem odd.

What are you using to try to change the fuses? If it's avrdude, sounds like the device configuration section in the avrdude config file might have some issues.

What exactly are the errors you are receiving when trying to change the fuses?

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

its avr-studio 6

when burning the fuses I get a pop up "one of more registers fifers"

if I hit details:

Timestamp: 2014-07-19 10:38:18.358
Severity: ERROR
ComponentId: 20000
StatusCode: 0

One or more registers differs

Atmel.VsIde.AvrStudio.Services.TargetService.RegistersMismatchException:

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

Quote:

if I hit details:

Does it tell you what it expected, and what it got?

Some tools will read back unused fuse bits differently than other tools.

Quote:

"one of more registers fifers"

Someone is creating a list of available flute players? :twisted:

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

theusch wrote:
Someone is creating a list of available flute players? :twisted:
:)

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

If you mean what fuse orders its all. If I set hi, lo, or ex I get the same error.

this is trying to write the high bit.
Starting operation write registers

Writing register EXTENDED...OK

Writing register HIGH...OK

Writing register LOW...OK

Write registers...OK
Starting operation verify registers

Verify register EXTENDED...OK

Verify register HIGH...Failed!

Verify register LOW...OK

Verify registers ...Cancelled

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

I tried to test the device to see if its actually writing anything. Seems the code ( boot loader ) is flashing correctly as it works. but the flash-able code requires the correct fuse bits and its not working thus its clearly not writing the bits correctly or at all. So it appears AVR studio is correct, its not writing the correct fuse bits and it does flash the code.

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

Which AVR?

Have you tried others of the same device? Other devices?

This still smells like a configuration problem similar to that discussed in the thread Lee linked to above.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

I would try it with stk500.exe, Studio4, avrdude.exe, ...

The STK500 protocol has not altered in the last several years. So any proven program should work. Unless you are using some brand new AVR model. Note that the A versions of an AVR e.g. ATmega32A should behave exactly like the non-A version.

In fact, given a choice of -A or non-A, I would select non-A. After all, the older chip is likely to have a correct configuration file.

Once you have verified the chip, you can investigate why AS6 is giving problems.

David.

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

I have had a lot of issues with avr6 I may just uninstall it and try 4 but first I'd like to see of stk500.exe works

I have 168p's and 328's The 168p' fail to read ID, cant do anything with it. The 328's are what I have describe above.

how do you set fuses with stk500.exe? Do I not need to set extended?
Here hare my fuses
ex:fd
hi:da
lo:df

STK500 -ccom4 -datmega328 -fDFDA

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

To show stk500 switches and arguments:

stk500 -h

Note that a 16-bit hex value is HHLL
I don't think that you need the 0x prefix.

STK500 -ccom4 -datmega328 -fDADF -EFD

stk500.exe should be able to find the XML for the ATmega328.

Note that the 328 did not appear until many years after the 328P

David.

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

yeah I dont know... I guess ill try av4

c:\temp>STK500 -ccom4 -datmega328 -fDADF -EFD
Device not known

Update:: with av4 I can not write either fuses or code, both case it report failed on verify. I'm able to read the device ID however.

Attachment(s): 

Last Edited: Sun. Jul 20, 2014 - 03:29 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, my stk500.exe shows v2.4 (c) 2004-2011
My AS4 version is AS4.19

It knows ATmega328.

You can see which devices it knows by stk500 -?

It is more likely to be "avrdude.conf" that is out of date. e.g. if you are using WinAVR-2010

David.

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

yeah hmmm...
AT90S1200, AT90S2313, AT90S4414, AT90S4433, AT90S2333, AT90S8515, AT90S2323,
AT90S2343, AT90S8535, AT90S4434, ATMEGA103, ATMEGA128, ATMEGA323, ATMEGA32,
ATMEGA161, ATMEGA162, ATMEGA163, ATMEGA16, ATMEGA169, ATMEGA8, ATMEGA8515,
ATMEGA8535, ATTINY11, ATTINY12, ATTINY15, ATTINY22, ATTINY26, ATTINY28,
AT89S51, AT89S52, AT86RF401

ardude.conf has no fine for 328 but there is a secontion for the pico version but still no define
#------------------------------------------------------------
# ATmega328P
#------------------------------------------------------------

Yes its 2010, and looks to be the latest available.

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

No, there are several avrdude versions since the WinAVR-2010 distribution.

Mind you, even an old avrdude should work. After all, the only difference between m328P and m328 is the Signature bytes. i.e. you can add the m328 entry yourself.

Why do you want to use HVPP?
Have you tried with a new ATmega328 ?

David.

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

yes I have many 328's but I want to fix 30 of them that have gone bad because of wrong fuse flashing. What kills me the most is I got my stk500 from by brother that has a total of 5 days experience with avr programmer. Yet he some how could do this?

Anyways, yes I want to make a HH burning station to recover from such things, I dont car if I use avr studio, avrdude, or stk500. Surly there is a way to do this?

I also saw this thread
https://www.avrfreaks.net/index.p...

So what do I have to do to make this work? Adding the m328 entry and rebooting didnt help.

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

S_K_U_N_X wrote:
Anyways, yes I want to make a HH burning station to recover from such things, I dont car if I use avr studio, avrdude, or stk500. Surly there is a way to do this?

http://mightyohm.com/blog/produc...

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

By the sound of it, you have many good m328s. So you can verify that the STK500 works ok in HVPP mode with the good AVRs.

If you can read the Signatures from the bad m328s, you should be able to read the fuses and lock bits.

This will give you a clue as to where you went wrong.

David.

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

Quote:
By the sound of it, you have many good m328s. So you can verify that the STK500 works ok in HVPP mode with the good AVRs.
and it does not.

Quote:
If you can read the Signatures from the bad m328s, you should be able to read the fuses and lock bits.
and I can

Quote:
This will give you a clue as to where you went wrong.
I know where I when wrong, I programmed the reset fuse. I need that pin for my project. So the correct way to burn my project is.

code then fuses. If I f-that up by doing fuses first I get a bad chip.

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

Well, I would expect HVPP to recover RSTDISBL.

If a good m328 does not work in HVPP mode, there is something seriously wrong with your STK500 or the XML or the Silicon.

I have always been intrigued by the m328 appearing so long after the m328p. Are they an m328p that failed the picopower tests?

I don't own a m328. I have a m168 and m328p. I know that I have tried HVPP with the m168 and it works fine.

I would do anything to avoid RSTDISBL. There are several tricks that can be used to share pins. Yes, I can see you running out of pins on a tiny85 but a PDIP-28 or TQFP-32 shhould give you more scope.

David.

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

Quote:

I have always been intrigued by the m328 appearing so long after the m328p. Are they an m328p that failed the picopower tests?

My take in 2012:
https://www.avrfreaks.net/index.p...
Quote:
AFAIK, there is the same situation as with the Mega328:

-- In the past, there was e.g. a Mega88, then a Mega88P, then a Mega88A and Mega88PA with the "A" representing the die/fab change.
-- There never was a Mega328P until the die/fab change, so it just became a Mega328P instead of a Mega328PA.

Just my recollection/speculation. Yes, Atmel could have gone to e.g. Mega328PA and then the family naming would be consistent--except for the "missing" Mega328P. Damned if you do...

I'll need to examine my datasheet collection tomorrow when at the office.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

david.prentice wrote:
Well, I would expect HVPP to recover RSTDISBL.

If a good m328 does not work in HVPP mode, there is something seriously wrong with your STK500 or the XML or the Silicon.

I have always been intrigued by the m328 appearing so long after the m328p. Are they an m328p that failed the picopower tests?

I don't own a m328. I have a m168 and m328p. I know that I have tried HVPP with the m168 and it works fine.

I would do anything to avoid RSTDISBL. There are several tricks that can be used to share pins. Yes, I can see you running out of pins on a tiny85 but a PDIP-28 or TQFP-32 shhould give you more scope.

David.

but the 168 also does not work... it fails in the exact same way.

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

Quote:

I have always been intrigued by the m328 appearing so long after the m328p. Are they an m328p that failed the picopower tests?

Perhaps you need to expound on what "appear" means.

Quote:
ATmega48A
ATmega48PA
ATmega88A
ATmega88PA
ATmega168A
ATmega168PA
ATmega328
ATmega328P
...
Rev. 8271B–AVR–04/10

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

I also read another wiring guide and this one says not to use the ppump but doing that makes matters worse. This guide says to set the xtail switch close to the oscillator but I dont see an xtail switch. Maybe the stk503 does? Aside from that my board looks wired correctly.

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

Quote:
but the 168 also does not work... it fails in the exact same way.

This implies that you have got your wiring wrong.

Let's get this straight. I assume that you are using PDIP-28 parts. And you are following the STK500 jumpers from the user guide. i.e. Table 3-3. High-voltage Programming Settings.

Yes, of course you connect PJUMP and BSEL2.

David.

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

yes fits in the "green" port on the stk-500(SCKT3200A2 ).
PJUMP jumpers and mount BSEL2
copied the jumpers from

As mentioned in this thread I have the 2 10 pins correctly connected.

Took a few shots of the board encase I made an error that I keep over looking. the isp is just loose.

Attachment(s): 

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

Where is the wire between BSEL2 and PC2 ?

A picture is better than a thousand words!

David.

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

Quote:
A picture is better than a thousand words!
Exactly why I did this.

Connect this makes it work but how is one to get this from the link I gave in my first post?

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

Figure 3-27. BSEL2 Connection for ATmega8

David.

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

You get the information from the device selector under "High Voltage Programming" for the

Quote:
ATtiny48
ATtiny88
ATmega48(P)
ATmega8
ATmega88(P)
ATmega168(P)
ATmega328P
which also shows you the socket number and colour and it says
Quote:
Parallel programming as above, mount PJUMP jumpers, and mount BSEL2 terminal to PC2. See section BSEL2 Jumper, and section PJUMP Jumpers.

Attachment(s): 

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

very good then.

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

Quote:

This guide says to set the xtail switch close to the oscillator but I dont see an xtail switch.

Yet the diagram that YOU posted clearly shows XTAL1 next to OSCSEL. What part of that is confusing?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

As David and John have noted, Where is the wire between BSEL2 and PC2 ?

From http://www.atmel.com/webdoc/stk500/stk500.BSEL2jumper.html

Stan

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

very good then.