Re: avrdude and fuse programming

Matt Everett <[email protected]> Tue, 20 May 2003 06:48:29 -0700 (PDT)
Newsgroups gmane.comp.hardware.avr.general
Message-ID <[email protected]>
Ok, I am pretty sure the fuse programming worked... I
changed low fuse from 0xe1 to 0xe4 (internal
oscillator from 1MHz to 8MHz).  The part is an
ATmega32L.  Now, however, the device is behaving very
strangely...

Prior to changing the fuses, the chip worked fine.  It
would program and I could communicate over the
internal serial port @ 2400 baud.  After the change,
it will not run the program (I get no activity on the
Rx and Tx pins), and the device behaves erratically
during an avrdude -t session.  The signature changes
(is read incorrectly) sometimes ... the fuse bytes
read correctly for about 2-3 seconds, then return 0
... The flash will no program (returns mismatch on
first byte of flash 0x0c != 0x00) ... repeated dumps
of the flash return different values.

After an email exchange with someone who had a similar
problem w/ a 128 (on the avrdude-dev list), it looks
like there could be a power-up timing problem.  I
didn't change the power-up timing fuses (still at 10
factory default).  This behavior has been repeated on
another working ATmega32L.  My reset circuit is
currently a 4.7k resisitor to Vcc (+5V).  Power is
supplied by an LM7805 powered by a 9V battery.  My DMM
reads 4.97 VDC on the breadboard, steady.  I don't
have an O-scope :(, so I don't know how the pwr and
rst lines rise with respect to one another.

Any ideas on how I can get this device to boot
correctly so that I can change the oscillator back? 
I'd rather have a part running @ 1MHz than not running
at all.  Ideally, if I can get the boot to work
correctly, I will reprogram it to use an external
ceramic oscillator @ 8MHz for stability.

Hopefully this wasn't TOO much information, but I
thought I would aim high to avoid the inevitable
"Sounds good, but can you tell me xxxx..." follow ups
:)

Thanks in advance...
-Matt


--- Joerg Wunsch <[email protected]> wrote:
> Matt Everett <[email protected]> wrote:
> 
> > Does anyone out there use avrdude and know how to
> properly program
> > fuses with it?  I can load my programs to my
> atmega32 just fine
> > (using a dt006 type programming cable), but my
> clock options are
> > stuck with the 1MHz internal oscillator until I
> can figure out how
> > to reprogram the fuse bits!
> 
> You program them as any other memory range.  The
> simplest method by
> now would be »terminal mode«:
> 
> avrdude ... -t
> avrdude> d lf
> 
> Should tell you 0xe1, which is the default for the
> fuse low byte.
> Setting this to 0xef should be for you, see the
> datasheet:
> 
> avrdude> w lf 0 0xef
> 
> avrdude> d hf
> 
> The fuse high byte, ought to be 0x99 by default. 
> Set it to 0x89 in
> order to set the CKOPT fuse (which is used for
> crystals > 1 MHz):
> 
> avrdude> w hf 0 0x89
> avrdude> q
> 
> -- 
> J"org Wunsch					       Unix support engineer
> [email protected]       
> http://www.interface-systems.de/~j/
> 
> _______________________________________________
> avr-chat mailing list
> [email protected]
> http://www.avr1.org/mailman/listinfo/avr-chat


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com