[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] Yet another config parameter
From: |
E. Weddington |
Subject: |
Re: [avrdude-dev] Yet another config parameter |
Date: |
Thu, 20 Feb 2003 13:48:28 -0700 |
On 20 Feb 2003 at 15:16, Brian Dean wrote:
> 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?
No, that was a separate issue. Hence didn't commit that change.
There's 2 separate issues:
1. The Windows port working for various device. Yes, it does look
like some timing issues and that will be ironed out.
2. Discrepency in the spec's algorithms.
If you look in the m128 spec > Memory Programming > SPI Serial
Programming Pin Mapping > SPI Serial Programming Algorithm > #3:
"... If the $53 did not echo back, give /RESET a positive pulse and
issue a new programming enable command."
m163 spec > Memory Programming > Serial Downloading > Serial
Programming Algorithm > #3:
"... If the $53 did not echo back, give SCK a postivie pulse and
issue a new programming enable command. If the $53 is not seen within
32 attempts, there is no functional device connected."
The m163 errata gave nothing concerning this and there is no m128
errata on Atmel's site.
-----
Also, why in the comments and the spec say to try enabling
programming mode up to 32 times and the code does 65 tries?
Eric
- Re: [avrdude-dev] Yet another config parameter, (continued)
- Re: [avrdude-dev] Yet another config parameter, E. Weddington, 2003/02/21
- Re: [avrdude-dev] Yet another config parameter, Brian Dean, 2003/02/21
- Re: [avrdude-dev] Yet another config parameter, E. Weddington, 2003/02/21
- Re: [avrdude-dev] Yet another config parameter, Joerg Wunsch, 2003/02/21
- Re: [avrdude-dev] Yet another config parameter, E. Weddington, 2003/02/21
- [avrdude-dev] giveio, E. Weddington, 2003/02/21
Re: [avrdude-dev] Yet another config parameter,
E. Weddington <=