avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] Yet another config parameter


From: Brian Dean
Subject: Re: [avrdude-dev] Yet another config parameter
Date: Thu, 20 Feb 2003 15:16:03 -0500
User-agent: Mutt/1.4i

On Thu, Feb 20, 2003 at 12:16:45PM -0700, E. Weddington wrote:

> Joerg stated:
> "I could successfully talk to an AT90S1200, an AT90S2333, and an
> ATmega128.  The only strange thing is that any attempt to talk to an
> ATmega163-equipped board fails under Windows, while it works, using
> the same programming dongle under FreeBSD on the same machine."
> 
> So there are some timing issues we're going to be looking at.
> 
> But...
> 
> Interestingly, I compared the data sheets for m163 and m128 and found 
> a difference:
> 
> m128: If entering programming mode failed, then toggle /RESET.
> m163: If entering programming mode failed, then toggle SCK.

But the code was doing what the M163 said - pulsing SCK.  I suspect
that the doc for the M128 is a typo, not sure about that.  I've never
had a report of some chips being able to enter programming mode while
others have not.

If the algorithm was wrong, I would expect it to fail on both Windows
and FreeBSD.  I suspect it might be a timing thing - note that the
inb() / outb() function you are using, if they are directly accessing
the registers of the parallel port, will operate much faster than the
FreeBSD and Linux ioctl()'s.

The clocking of SCK is so that the programming can get back into sync
if it is out, repeated at least 32 times to fully wrap the instruction
length.  The pulsing of RESET happens outside of that loop.  There
could be a problem there, but I'd have thought it would have been
exposed by now (the current code has worked fine for several years).

> The current source has a hardcoded toggling of SCK. The source that 
> Joerg was testing I had changed to toggling /RESET.

When you changed it, did that make the device enter program mode?

-Brian




reply via email to

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