avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] Opcode for poll RDY/#BSY


From: Joerg Wunsch
Subject: Re: [avrdude-dev] Opcode for poll RDY/#BSY
Date: Thu, 28 Jun 2012 23:07:02 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

As Hannes Weisbach wrote:

> while polishing avrftdi code and looking through some AVR
> datasheets, I came across "Poll RDY/#BSY" opcode in the serial
> programming instruction set.  This command would solve timing issues
> in avrftdi, so I looked the opcode up in the avrdude source code,
> but I could not find it. Apparently, it is not implemented.

Yes, that appears to be the case.

> Is there a specific reason - other than that it was not needed
> before - for not implementing it?

It's just nobody did it.

In the older programming algorithm (e.g. in the ATmega128), polling
had to be done differently, by reading back a particular value.  This
is basically implemented in avr_write_byte_default(), at line 599ff.

However, polling never made it into the paged write routines used for
bitbang programmers.  By the time devices with a paged algorithm came
up, most users had already switched away from the old bitbangers,
towards things like an STK500 which does the polling inside the
firmware.

> At least for parts, who have this instruction, the timing issues
> could be resolved rather elegantly.

The config file has to be extended in order to describe which devices
do support the new-style polling.

Ideally, I'd like to get rid of all the ISP instructions in the config
file.  After all, they are basically the same for every AVR
(STK500/600 are also based on that fact).  Alas, it's a tremendous
amount of work to change this.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



reply via email to

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