Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: [AVR-Chat] STK500 starter kit

Re: [AVR-Chat] STK500 starter kit

2004-11-05 by David Jones

>>> dvanhorn@dvanhorn.org 05/11/2004 2:22:25 pm >>>
>Until you accidently "disable" the ISP mode which renders your chip
>next to useless unless you have a parallel programmer to fix it. For
>some reason people don't like to talk much about this major trap for
>young players.

>I wouldn't say that so much as it just dosen't happen that often.

That's beside the point. It can and does happen.
What happens if you have a soldered an AVR part on a board and lock up
the ISP mode? - bad news.
I know people who refuse to use SMD or solder DIP AVR parts into any
board, and I must say I'm one of them. Call me paranoid, but I'm not
going to design in a non-robust ISP system into one of my designs.

>Try a PIC sometime, IIRC if you lock the code, you can no longer
reprogram 
>the part at all.
>On the AVR, you just erase the part and carry on.

PICs are the primary micro I use. You can't render a Flash PIC part
useless no matter what you program into it. There were a few exceptions
to this on specific parts, but they have long since been fixed with
silicon revisions.

>You do have to make sure that the programmer isn't running too fast
for the 
>target system, especially when working with <1 MHz clocks.

Yet another silly AVR specific thing.
I can't believe the guys who designed the AVR ISP did it in this way,
it's completely non-robust. I can imagine the laughter if I tried to
propose such a system at a design review!

ISP modes on other micros like the PIC just work. No traps.

Dave :)

Re: [AVR-Chat] STK500 starter kit

2004-11-05 by Dave VanHorn

>
>That's beside the point. It can and does happen.
>What happens if you have a soldered an AVR part on a board and lock up
>the ISP mode? - bad news.
>I know people who refuse to use SMD or solder DIP AVR parts into any
>board, and I must say I'm one of them. Call me paranoid, but I'm not
>going to design in a non-robust ISP system into one of my designs.

Hmm.. Well, we have a system in production with three AVRs in it, and 
haven't had any problems.

Fuse gotchas (was Re: STK500 starter kit)

2004-11-05 by Graham Davies

--- In AVR-Chat@yahoogroups.com, "David Jones" <david.jones@s...> 
wrote:

> ... ISP modes on other micros
> like the PIC just work. No traps.

Maybe the PIC, but not all micros. The ZiLOG Z8 Encore! has a far 
worse gotcha than the AVR because the oscillator settings are 
controlled by the first word of program memory, not by separately 
accessed fuses. So, you can shoot yourself in the foot much more 
easily, including just looking at program memory in the debugger and 
trying to change what is stored by typing over values. It works, but 
thereafter nothing else does.

I agree that this is an issue for beginners and more attention should 
be brought to it.

Recall that I discovered that fuse gotchas are solved for AVRs with 
the JTAG interface because this interface does not require the clock 
to be running so you can repair any fuse misconfigurations.

The thread on the STK500 was really interesting. I was, of course, 
looking for new product opportunities, but it seems that ISP is a 
generally a solved problem.

Graham.

Re: STK500 starter kit

2004-11-05 by Joel Kolstad

> What happens if you have a soldered an AVR part on a board and 
lock up
> the ISP mode? - bad news.
> I know people who refuse to use SMD or solder DIP AVR parts into 
any
> board, and I must say I'm one of them. Call me paranoid, but I'm 
not
> going to design in a non-robust ISP system into one of my designs.

That is paranoid, and for a company making real products, monetarily 
wasteful.  I've never 'accidentally' disabled ISP on an AVR, and 
I've used plenty of them.  I mean, how can you inadvertently disable 
ISP other than (1) clicking on the configuration bit setting in a 
programming application that you didn't need to or (2) perhaps 
having signal integrity problems during programming?  In the first 
case, that's clearly user error (and something that should be 
learned long before a product ships) and in the second case it's a 
bad design anyway and you're lucky if programming is the only thing 
you have problems with.

There are plenty of commercial products out there that can 
be 'killed' if 'things go wrong' during an upgrade -- the prime 
example being PCs, where a power outage in the middle of re-flashing 
the BIOS ROM can potentially leave it completely dead.

> >You do have to make sure that the programmer isn't running too 
fast
> for the 
> >target system, especially when working with <1 MHz clocks.
> 
> Yet another silly AVR specific thing.

Is the PIC programming interface completely asynchronous?  If not 
surely there's some maximum clock rate on the data, right? 

> I can't believe the guys who designed the AVR ISP did it in this 
way,
> it's completely non-robust. 

I wouldn't argue that there isn't room for improvement, 
but 'completely non-robust' is a patently false characterization. 

---Joel

Re: STK500 starter kit

2004-11-05 by Joel Kolstad

By the way, if you think AVR programming is 'non-robust,' I hope you 
never end up using CPLDs or FPGAs where 'accidentally' sending a bad 
bitstream can cause the part to _melt down and die_ (internally lots 
of outputs all get shorted together).  We had a design where we 
accidentally sent the bitstream from a different model board to the 
FPGA ane it blew out the board's power supply (which was at least a 
lot easier and cheaper to fix than swapping the BGA FPGA would have 
been!).  

---Joel Kolstad

Re: [AVR-Chat] Fuse gotchas (was Re: STK500 starter kit)

2004-11-05 by Ken Holt

While skimming and deleting this thread, I have just been debugging a 
returned
board that does seem to have a fuse/lockup problem.  I cannot reach the 
Tiny26
through the ISP (STK500 cable); but the Tiny continues to operate it's 
pre-downloaded
program.  I assume that the serial enable fuse was accidently turned off 
by someone,
and now there is nothing that can be done to load new code.
The Tiny is an smt, soldered in place, and even if I could get it off 
cleanly, I don't
think there's any way to place it on the STK500.
Should I assume there's no way to move forward?

thanks,
Ken



Graham Davies wrote:

>--- In AVR-Chat@yahoogroups.com, "David Jones" <david.jones@s...> 
>wrote:
>
>  
>

What happens if you have a soldered an AVR part on a board and lock up
Show quoted textHide quoted text
>the ISP mode? - bad news.

>>... ISP modes on other micros
>>like the PIC just work. No traps.
>>    
>>
>
>Maybe the PIC, but not all micros. The ZiLOG Z8 Encore! has a far 
>worse gotcha than the AVR because the oscillator settings are 
>controlled by the first word of program memory, not by separately 
>accessed fuses. So, you can shoot yourself in the foot much more 
>easily, including just looking at program memory in the debugger and 
>trying to change what is stored by typing over values. It works, but 
>thereafter nothing else does.
>
>I agree that this is an issue for beginners and more attention should 
>be brought to it.
>
>Recall that I discovered that fuse gotchas are solved for AVRs with 
>the JTAG interface because this interface does not require the clock 
>to be running so you can repair any fuse misconfigurations.
>
>The thread on the STK500 was really interesting. I was, of course, 
>looking for new product opportunities, but it seems that ISP is a 
>generally a solved problem.
>
>Graham.
>
>
>
>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>

Re: [AVR-Chat] Fuse gotchas (was Re: STK500 starter kit)

2004-11-06 by Ian Drennan

> I agree that this is an issue for beginners and more attention should
> be brought to it.
>
> Recall that I discovered that fuse gotchas are solved for AVRs with
> the JTAG interface because this interface does not require the clock
> to be running so you can repair any fuse misconfigurations.

Greetings all

I have been following this thread with  interest as I am new to AVR and am
about 3 weeks into using my new STK500.
The 'fuse gotcha' issue seems to have got me today when I plugged in a new
Mega8 and changed an oscillator fuse so as to run using the STK500 onboard
clock. I set the fuse for external clock i.e.. Ext. Clock; StartupTime: 6CK
+ 64 ms;[CKSEL = 0000 SUT = 10]

Obviously this was a mistake as I am now locked out and assume the part is
now useless. Please can someone advise what the fuse setting should have
been to allow the mega8 to run using the STK500 onboard clock.

Many thanks
Ian

RE: [AVR-Chat] Fuse gotchas (was Re: STK500 starter kit)

2004-11-06 by Larry Barello

No AVR part is useless after programming the fuse bits.  You just have to
use the appropriate programming method - fortunately the STK500 supports
both ISP and Parallel programming.  For example, program the RESET line to
be an I/O pin on the tiny26 and you are REALLY HOSED, unless you use
parallel mode to "recover" your chip.  However, for the run of the mill: I
programmed an external clock...  You simply enable the external clock drive
on your STK500 - read the manual about those little jumpers near the back of
the board.

There are gotcha's with ISP: if your target board has an output driving the
MISO or SCK then it won't work.  I arrange my designs to have the ISP lines
brought directly out to the header and then insert 4.7k resisters between
the ISP pins and the rest of the circuit.  I just don't put any high-drive
elements on the other side of the resisters (e.g. LEDs)

Cheers!
Show quoted textHide quoted text
-----Original Message-----
From: Ian Drennan [mailto:ianid@sai.co.za]
Sent: Saturday, November 06, 2004 6:03 AM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] Fuse gotchas (was Re: STK500 starter kit)




> I agree that this is an issue for beginners and more attention should
> be brought to it.
>
> Recall that I discovered that fuse gotchas are solved for AVRs with
> the JTAG interface because this interface does not require the clock
> to be running so you can repair any fuse misconfigurations.

Greetings all

I have been following this thread with  interest as I am new to AVR and am
about 3 weeks into using my new STK500.
The 'fuse gotcha' issue seems to have got me today when I plugged in a new
Mega8 and changed an oscillator fuse so as to run using the STK500 onboard
clock. I set the fuse for external clock i.e.. Ext. Clock; StartupTime: 6CK
+ 64 ms;[CKSEL = 0000 SUT = 10]

Obviously this was a mistake as I am now locked out and assume the part is
now useless. Please can someone advise what the fuse setting should have
been to allow the mega8 to run using the STK500 onboard clock.

Many thanks
Ian






Yahoo! Groups Links

Fuse gotchas (was Re: STK500 starter kit)

2004-11-06 by Stefan Wimmer

--- In AVR-Chat@yahoogroups.com, Ken Holt <kholt@m...> wrote:
> While skimming and deleting this thread, I have just been 
debugging a 
> returned
> board that does seem to have a fuse/lockup problem.  I cannot 
reach the 
> Tiny26
> through the ISP (STK500 cable); but the Tiny continues to operate 
it's 
> pre-downloaded
> program.  I assume that the serial enable fuse was accidently 
turned off 
> by someone,
> and now there is nothing that can be done to load new code.
> The Tiny is an smt, soldered in place, and even if I could get it 
off 
> cleanly, I don't
> think there's any way to place it on the STK500.
> Should I assume there's no way to move forward?

I had a similar problem lately. What I did was: remove the 'faulty' 
AVR (a Mega8 with accidentially disabled Reset line) using a smd 
repair hot air gun, clean and reflux the board and solder on a new 
one. Not a big story if you have the right tools at hand or know 
someone who has (takes about 2 minutes that way). And not a big loss 
to trash a ~$2 part - what do you pay for a Tiny26 that you are so 
concerned about the thing?

Stefan

Re: [AVR-Chat] Fuse gotchas (was Re: STK500 starter kit)

2004-11-06 by Ian Drennan

----- Original Message -----
Show quoted textHide quoted text
From: "Larry Barello" <yahoo@barello.net>
To: <AVR-Chat@yahoogroups.com>
Sent: Saturday, November 06, 2004 5:36 PM
Subject: RE: [AVR-Chat] Fuse gotchas (was Re: STK500 starter kit)


>
> No AVR part is useless after programming the fuse bits.  You just have to
> use the appropriate programming method - fortunately the STK500 supports
> both ISP and Parallel programming.  For example, program the RESET line to
> be an I/O pin on the tiny26 and you are REALLY HOSED, unless you use
> parallel mode to "recover" your chip.  However, for the run of the mill: I
> programmed an external clock...  You simply enable the external clock
drive
> on your STK500 - read the manual about those little jumpers near the back
of
> the board.
>
> There are gotcha's with ISP: if your target board has an output driving
the
> MISO or SCK then it won't work.  I arrange my designs to have the ISP
lines
> brought directly out to the header and then insert 4.7k resisters between
> the ISP pins and the rest of the circuit.  I just don't put any high-drive
> elements on the other side of the resisters (e.g. LEDs)
>
> Cheers!
>
> -----Original Message-----
> From: Ian Drennan [mailto:ianid@sai.co.za]
> Sent: Saturday, November 06, 2004 6:03 AM
> To: AVR-Chat@yahoogroups.com
> Subject: Re: [AVR-Chat] Fuse gotchas (was Re: STK500 starter kit)
>
>
>
>
> > I agree that this is an issue for beginners and more attention should
> > be brought to it.
> >
> > Recall that I discovered that fuse gotchas are solved for AVRs with
> > the JTAG interface because this interface does not require the clock
> > to be running so you can repair any fuse misconfigurations.
>
> Greetings all
>
> I have been following this thread with  interest as I am new to AVR and am
> about 3 weeks into using my new STK500.
> The 'fuse gotcha' issue seems to have got me today when I plugged in a new
> Mega8 and changed an oscillator fuse so as to run using the STK500 onboard
> clock. I set the fuse for external clock i.e.. Ext. Clock; StartupTime:
6CK
> + 64 ms;[CKSEL = 0000 SUT = 10]
>
> Obviously this was a mistake as I am now locked out and assume the part is
> now useless. Please can someone advise what the fuse setting should have
> been to allow the mega8 to run using the STK500 onboard clock.
>
> Many thanks
> Ian

Larry
Thanks for this reply.
Soon after sending my mail I realised that the I had the OSCSEL jumper miss
mounted. All is now ok
Regards
Ian

Re: [AVR-Chat] Fuse gotchas (was Re: STK500 starter kit)

2004-11-06 by Ken Holt

Stefan -
Thanks for your advice - I have assumed that I will be just removing and
replacing the Tiny26, but I was starting to think what other theoretical 
possibilities
there were.   For parallel programming, my old STK500 manual doesn't even
mention the Tiny26s, and I'd have to find an adaptor to actually plug it in.
I'm really more concerned about how to keep this lockup from happening 
again,
as it seems to have at my client's shop.  I assumed that the SPIEN fuse 
had been
disabled by faulty programming, but the spec says that fuse cannot be 
changed by
serial mode, nor the RSTDISBL fuse.  My reset pin does still work, since 
grounding
it restarts the program.  Also, the internal clock is still selected and 
running, so the
device hasn't been accidently set to external clock.
The MOSI and MISO pins are used (during operation) as inputs from a 
Cypress USB
chip, and I once thought that maybe those two signals might cause havoc 
under the
right circumstance; however SCLK and Reset are both local only to the 
ISP header.
I've pulled up MISO and MOSI and connected them only to the ISP header, 
with still
no-talkie.

Ken




Stefan Wimmer wrote:
Show quoted textHide quoted text
>--- In AVR-Chat@yahoogroups.com, Ken Holt <kholt@m...> wrote:
>  
>
>>While skimming and deleting this thread, I have just been 
>>    
>>
>debugging a 
>  
>
>>returned
>>board that does seem to have a fuse/lockup problem.  I cannot 
>>    
>>
>reach the 
>  
>
>>Tiny26
>>through the ISP (STK500 cable); but the Tiny continues to operate 
>>    
>>
>it's 
>  
>
>>pre-downloaded
>>program.  I assume that the serial enable fuse was accidently 
>>    
>>
>turned off 
>  
>
>>by someone,
>>and now there is nothing that can be done to load new code.
>>The Tiny is an smt, soldered in place, and even if I could get it 
>>    
>>
>off 
>  
>
>>cleanly, I don't
>>think there's any way to place it on the STK500.
>>Should I assume there's no way to move forward?
>>    
>>
>
>I had a similar problem lately. What I did was: remove the 'faulty' 
>AVR (a Mega8 with accidentially disabled Reset line) using a smd 
>repair hot air gun, clean and reflux the board and solder on a new 
>one. Not a big story if you have the right tools at hand or know 
>someone who has (takes about 2 minutes that way). And not a big loss 
>to trash a ~$2 part - what do you pay for a Tiny26 that you are so 
>concerned about the thing?
>
>Stefan
>
>
>
>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>

RE: [AVR-Chat] Fuse gotchas (was Re: STK500 starter kit)

2004-11-06 by Larry Barello

The wiring for setting up the STK500 for parallel mode with a tiny26 can be
found in the help section of Astudio 4.x (not 3.x!) - you will have to dig
around a bit to find it.  It requires a custom 10 conductor cable.

What I do to recover chips that won't ISP program, is to get an SOIC test
clip, bring all wires out to a 20 pin wire-wrap dip and plug that into the
tiny26 socket of the STK500.  Then I can clip on, put the board into
parallel mode and recover the chip.

This isn't guaranteed to work depending upon what is connected to the
various pins of the tiny26.

Cheers!

P.S. I have never had a chip "lock up" in the field, but I have had batches
of chips from the factory with one or more CPUs with the wrong fuse
settings.  Out of four or five hundred CPUs maybe 3 or 4 like that.

What I *have* done, is forget to read/set the fuse settings and start
programming chips (after, say, programming some mega16's) and really messing
up the tiny26.  Once I blew through four or five boards before I figured out
what I was doing wrong :)
Show quoted textHide quoted text
-----Original Message-----
From: Ken Holt [mailto:kholt@monitor.net]
Sent: Saturday, November 06, 2004 2:28 PM
To: AVR-Chat@yahoogroups.com
Subject: Re: [AVR-Chat] Fuse gotchas (was Re: STK500 starter kit)



Stefan -
Thanks for your advice - I have assumed that I will be just removing and
replacing the Tiny26, but I was starting to think what other theoretical
possibilities
there were.   For parallel programming, my old STK500 manual doesn't even
mention the Tiny26s, and I'd have to find an adaptor to actually plug it in.
I'm really more concerned about how to keep this lockup from happening
again,
as it seems to have at my client's shop.  I assumed that the SPIEN fuse
had been
disabled by faulty programming, but the spec says that fuse cannot be
changed by
serial mode, nor the RSTDISBL fuse.  My reset pin does still work, since
grounding
it restarts the program.  Also, the internal clock is still selected and
running, so the
device hasn't been accidently set to external clock.
The MOSI and MISO pins are used (during operation) as inputs from a
Cypress USB
chip, and I once thought that maybe those two signals might cause havoc
under the
right circumstance; however SCLK and Reset are both local only to the
ISP header.
I've pulled up MISO and MOSI and connected them only to the ISP header,
with still
no-talkie.

Ken




Stefan Wimmer wrote:

>--- In AVR-Chat@yahoogroups.com, Ken Holt <kholt@m...> wrote:
>
>
>>While skimming and deleting this thread, I have just been
>>
>>
>debugging a
>
>
>>returned
>>board that does seem to have a fuse/lockup problem.  I cannot
>>
>>
>reach the
>
>
>>Tiny26
>>through the ISP (STK500 cable); but the Tiny continues to operate
>>
>>
>it's
>
>
>>pre-downloaded
>>program.  I assume that the serial enable fuse was accidently
>>
>>
>turned off
>
>
>>by someone,
>>and now there is nothing that can be done to load new code.
>>The Tiny is an smt, soldered in place, and even if I could get it
>>
>>
>off
>
>
>>cleanly, I don't
>>think there's any way to place it on the STK500.
>>Should I assume there's no way to move forward?
>>
>>
>
>I had a similar problem lately. What I did was: remove the 'faulty'
>AVR (a Mega8 with accidentially disabled Reset line) using a smd
>repair hot air gun, clean and reflux the board and solder on a new
>one. Not a big story if you have the right tools at hand or know
>someone who has (takes about 2 minutes that way). And not a big loss
>to trash a ~$2 part - what do you pay for a Tiny26 that you are so
>concerned about the thing?
>
>Stefan
>
>
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>





Yahoo! Groups Links

Fuse gotchas (was Re: STK500 starter kit)

2004-11-07 by Stefan Wimmer

--- In AVR-Chat@yahoogroups.com, Ken Holt <kholt@m...> wrote:
> Stefan -
> Thanks for your advice - I have assumed that I will be just 
removing and
> replacing the Tiny26, but I was starting to think what other 
theoretical possibilities there were.


Ok, it is always good to understand WHY something went wrong.
In my case it was easy: it was a simple case of me setting the wrong 
fuses (fingers klicking faster than brain could keep up...)  :-))

Stefan

Re: [AVR-Chat] STK500 starter kit

2004-11-15 by Brian Dean

On Fri, Nov 05, 2004 at 02:43:54PM +1100, David Jones wrote:

> That's beside the point. It can and does happen.  What happens if
> you have a soldered an AVR part on a board and lock up the ISP mode?
> - bad news.

Are you sure it is the SPIEN fuse?  According to the datasheet you
cannot change the SPI enable fuse when actually using the ISP
interface.  I've tried to purposefully disable it using ISP
programming mode to no avail - it remains enabled.  I think one must
use JTAG or high voltage parallel programming to disable the SPIEN
fuse.

However, sometimes folks are guilty if changing the on-chip clock
source options which can leave the chip without a working clock.  For
example, can can set the fuse bits to select an external clock source
when there is none.  Not as deadly as clearing the SPIEN fuse as you
can generally feed in the needed clock and get back up and running.

It does sort've beg the question though - whey even have the option of
disabling the SPI programming interface?

-Brian
-- 
Brian Dean
BDMICRO - ATmega128 Based MAVRIC Controllers
http://www.bdmicro.com/

Re: [AVR-Chat] STK500 starter kit

2004-11-15 by Kathy Quinlan

Brian Dean wrote:

> On Fri, Nov 05, 2004 at 02:43:54PM +1100, David Jones wrote:
> 
> 
>>That's beside the point. It can and does happen.  What happens if
>>you have a soldered an AVR part on a board and lock up the ISP mode?
>>- bad news.
> 
> 
> Are you sure it is the SPIEN fuse?  According to the datasheet you
> cannot change the SPI enable fuse when actually using the ISP
> interface.  I've tried to purposefully disable it using ISP
> programming mode to no avail - it remains enabled.  I think one must
> use JTAG or high voltage parallel programming to disable the SPIEN
> fuse.
> 
> However, sometimes folks are guilty if changing the on-chip clock
> source options which can leave the chip without a working clock.  For
> example, can can set the fuse bits to select an external clock source
> when there is none.  Not as deadly as clearing the SPIEN fuse as you
> can generally feed in the needed clock and get back up and running.
> 
> It does sort've beg the question though - whey even have the option of
> disabling the SPI programming interface?
> 
> -Brian
Added Security ? IE no chance of jumping into bootloader mode etc.

Regards,

Kat.

-- 
---------------------------------------------------------------
K.A.Q. Electronics	Website: www.kaqelectronics.dyndns.org
IM: Yahoo: PinkyDwaggy  MSN: katinka@kaqelectronics.dyndns.org
For Everything Electronics     Phone: 0419 923 731
---------------------------------------------------------------

RE: [AVR-Chat] STK500 starter kit

2004-11-15 by Larry Barello

Security?

-----Original Message-----
From: Brian Dean 
...

It does sort've beg the question though - whey even have the option of
disabling the SPI programming interface?

Re: [AVR-Chat] STK500 starter kit

2004-11-15 by Brian Dean

On Sun, Nov 14, 2004 at 08:49:41PM -0800, Larry Barello wrote:

> Security?

Maybe.  But isn't that what the lock bits are for?

-Brian

Disabling SPIEN (was Re: STK500 starter kit)

2004-11-15 by Graham Davies

--- In AVR-Chat@yahoogroups.com, Brian Dean <bsd@b...> wrote:

> ... whey even have the option of
> disabling the SPI programming interface?

I agree with Brian that the lock bits are the main security 
mechanism. So, how about another guess ... maybe if you're using the 
SPI pins for something else, you would worry that you'd accidentally 
trigger SPI and mess up the chip. By disabling SPI, you make this 
impossible and get to sleep better.

Graham.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.