avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Problems reading writing fuses to at90s1200 with stk50


From: Jan-Hinnerk Reichert
Subject: Re: [avrdude-dev] Problems reading writing fuses to at90s1200 with stk500
Date: Wed, 25 Feb 2004 12:33:44 +0100
User-agent: KMail/1.5.4

On Wednesday 25 February 2004 08:44, Klaus Rudolph wrote:

> > > Seems to be a much bigger problem here...
> > >
> > > As I looked a bit inside the code the fuse bits will be read
> > > out with the
> > > universal command what is not possible with actual firmware I
> > > think. Instead the commands 0x72 (ReadFuseBit) 0x77
> > > (ReadFuseBitsExt) and 0x73 (ReasdLockBits)
> > > should be used.
> >
> > I agree that it is not the best way to handle things (and it will
> > not work in parallel mode).
> >
> > However, I can't see why this should fail on newer firmware
> > unless the universal command has been removed.
>
> It would also not work in serial mode, .... the fuses could not set
> in serial mode :-)
> Maybe the fuse setting works for other devices with the newer
> firmware and the
> universal command.

It works for most (all?) mega-parts.

> > > As I think after 2 hour of code inspection there is a
> > > avr_read_byte_default function which
> > > uses for stk500 the stk500_cmd function which is not correct
> > > for fuses I think.
> >
> > Yes, that's the way it works.
>
> Fine. The code is not as easy as it could be. Again a project which
> uses object oriented
> features without a object oriented language... Nobody out there
> like c++ or?

There is some code-cleanup in progress ;-)

The problem is that avrdude started as PPI-programmer, so the 
programmer abstraction wasn't there from the start. There is still 
PPI-programmer dependant code in "main.c" ;-(

I joined the project just recently and can't say why c++ is not used. 
However, I believe that using c++ does automatically result in better 
code, e.g. the uisp code was quite bad the last time I looked (must 
more than a year  ago).

> > Do you know of any documentation?
>
> Yes. It is downloadable from avr.com. The AppNote 061. Here the
> full protocol for stk500
> is documented. There are a lot of hints for comming software
> versions which maybe change bits or
> bytes.

Sorry, I had already read this one, but hadn't realized that there is 
an appendix with all the fuses ;-(

There is also this note with all the fuse/lock-commands.
---------------
Note: For ISP Programming, use the Cmnd_STK_UNIVERSAL command with the 
appropriate ISP command bytes (found in the device data sheet).
---------------

Are you sure that newer firmware also uses 0x7x commands in serial 
mode?

Cheers
  Jan-Hinnerk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]