avr-chat
[Top][All Lists]
Advanced

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

Re: [avr-chat] avrdude-ATMega32 fuse bits issues


From: Chris Pontiga
Subject: Re: [avr-chat] avrdude-ATMega32 fuse bits issues
Date: Tue, 20 Dec 2005 20:34:08 -0800

Thanks for the reply Brian,

I've since then corrected the fuse bits with a high voltage programmer.

After debugging today, I have had some progress. I decided to try
moving the chip to a different part of the breadboard(cause you know
how older breadboards sometimes act). However, the first attempt at
programming via ISP(w/ avrdude and a bsd cable) was unsuccessful. The
chip signature still read 0x00012 with a verification error at the end
of programming. So decided to flip the crystal around, even though I
thought it shouldn't matter. Low and behold the first time the chip is
read after powerup, the correct chip signature comes up. However,
anytime after produces a wrong chip signature and fails programming.

GRR. So at this time I decide to try programming with the STK500 and
then returning the chip to the breadboard afterwards. And it turns out
that it does work. The crystal seems to be functioning correctly after
creating a timer program.

So at this point I would say that my problem lies in the bsd cable I
am using. For some reason it 0's out everything thing on the chip when
programming. I found out this was the case after popping the chip off
of the breadboard and back into the STK500.  I read the chip into a
file and found that all the bits were zero.

I am pretty sure that all the lines are hooked up correctly.  MISO,
MOSI, SCK, and RST are all connected to the chip through 330 ohm
resistors.  GND is connected directly to ground.

On 12/20/05, Brian Dean <address@hidden> wrote:
> On Sun, Dec 18, 2005 at 02:37:08PM -0800, Chris Pontiga wrote:
>
> > I am having quite a bit of trouble with the fuse bits and I have 4 chips
> > which exhibit this issue.  I am able to program the chip with the default
> > factory settings and it functions fine.  However, I need to use a 16Mhz
> > external crystal.  So I have that hooked up between the two XTAL pins with
> > two 22pF caps to gnd.
> >
> > I use the following to program the fuses:
> >
> > fuse:
> >     avrdude -u -pm32 -cbsd -E noreset -U lfuse:w:0x5f:m
> >     avrdude -u -pm32 -cbsd -E noreset -U hfuse:w:0xd1:m
>
> The problem could be that you don't have CKOPT programmed.  Without
> CKOPT programmed, getting the chip to run at 16 MHz is going to be hit
> or miss.  CKOPT enables the full rail-to-rail oscillator swing and is
> generally required for speed settings over 8 MHz.
>
> To recover the chip, try feeding an external clock signal (approx 1
> MHz TTL square wave) into the XTAL1 pin.  The exact speed is not
> critical - you just want to get the chip running.  Re-invoke avrdude
> and attempt to enter programming mode.  Reset the high fuse bit to
> 0xc1 instead of 0xd1.  Then remove the external clock signal and see
> if the chip starts by itself after that.
>
> -Brian
> --
> Brian Dean
> ATmega128 based MAVRIC controllers
> http://www.bdmicro.com/
>




reply via email to

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