avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] Load Extended Address command and word/byte programmin


From: Joerg Wunsch
Subject: Re: [avrdude-dev] Load Extended Address command and word/byte programming issues
Date: Tue, 20 Mar 2012 16:49:24 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

As Hannes Weisbach wrote:

> 1) Does avrdude take care of issuing a load extended address
> command? Because page programming is now done page-by-page avrdude
> "knows" when the 128k boundary is crossed and could issue a load
> extended address command. is this the case?

Depends on the programmer in use.  If you look into the code for
STK500v2, you'll find things like:

    /*
     * If bit 31 is set, this indicates that the following read/write
     * operation will be performed on a memory that is larger than
     * 64KBytes. This is an indication to STK500 that a load extended
     * address must be executed.
     */
    if (m->op[AVR_OP_LOAD_EXT_ADDR] != NULL) {
      use_ext_addr = (1U << 31);
    }
...
    if((last_addr==UINT_MAX)||(last_addr+block_size != addr)){
      if (stk500v2_loadaddr(pgm, use_ext_addr | (addr >> addrshift)) < 0)
        return -1;
    }

Other programmers, like the JTAGICEmkII, simply get a 32-bit address
passed along, and handle all that stuff internally.

> 2) If the programmer has to issue the load extended address command:
> Does the command need to be issued _exactly_ once, or can it be
> issued multiple times?

I don't think sending it more than once would harm, except being a
speed pessimization.

> 3) It seems to me, today all AVRs are programmed word-by-word, and a
> word being 2 bytes wide. Is this correct?

The flash memory area(s) is (are) programmed in terms of 16-bit units,
but all other memory areas use 8-bit units.
-- 
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]