[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] [avr910] Programing paged flash memory?
From: |
Theodore A. Roth |
Subject: |
Re: [avrdude-dev] [avr910] Programing paged flash memory? |
Date: |
Tue, 13 May 2003 21:43:47 -0700 (PDT) |
On Wed, 14 May 2003, Jan-Hinnerk Reichert wrote:
:)> Can you give some more info?
:)
:)Yes, of course. Some time ago I have completely rewritten an AVR910
compatible
:)programmer on an AT90S2313, so I'm quite familiar with the protocol. i have
:)obtained all information by studying the atmel source code of avr910 version
:)2.2.
:)
:)The avr910 will not perform a page write, unless it is told to by means of
the
:)"issue page write" command (that is 'm').
:)
:)BTW: Before this command the address has to be the beginning of the page. The
:)address is not changed by the "issue page write"-command.
:)
:)I didn't find any 'm' in the avrdude-output. And there doesn't seem to be any
:)related code in "avr910.c".
No, avrdude does support this yet. I was not aware of that command, but
looking through the avr910 2.3 asm source, I see it now. Uisp implements it
as far as I can tell.
:)
:)> Which device are you programming?
:)
:)ATmega161, but the device type shouldn't make a difference ;-(
Actually it does. Some devices don't support page programming. For example,
from uisp while programming a 8515:
Vendor Code: 0x1e
Part Family: 0x93
Part Number: 0x01
Atmel AVR AT90S8515 is found.
Page Write Disabled
FLASH Write Delay (t_wd_flash): 11111 us
EEPROM Write Delay (t_wd_eeprom): 11111 us
I need to dig up a device which has page programming that I can use in the
avr910 programmer I have (mcu00100). I think I have a m163 laying around
somewhere... ah yes there it is. From uisp for the m163:
Vendor Code: 0x1e
Part Family: 0x94
Part Number: 0x02
Atmel AVR ATmega163 is found.
Page Write Enabled, size=128
FLASH Write Delay (t_wd_flash): 41666 us
EEPROM Write Delay (t_wd_eeprom): 10555 us
Uploading: flash
#Loading data to address: 0 (page_addr_fetched=No)
Transmit: { A [41] . [00] . [00] }
Receive: { . [0d] }
Transmit: { c [63] . [0c] }
Receive: { . [0d] }
Loading data to address: 1 (page_addr_fetched=Yes)
Transmit: { C [43] . [94] }
Receive: { . [0d] }
<snip>
Loading data to address: 123 (page_addr_fetched=Yes)
Transmit: { C [43] . [f7] }
Receive: { . [0d] }
Loading data to address: 124 (page_addr_fetched=Yes)
Transmit: { c [63] . [08] }
Receive: { . [0d] }
Loading data to address: 125 (page_addr_fetched=Yes)
Transmit: { C [43] . [95] }
Receive: { . [0d] }
Transmit: { A [41] . [00] . [00] }
Receive: { . [0d] }
Transmit: { m [6d] }
Receive: { . [0d] }
I assume this is what you are talking about. For page programming, we need
to send the 'm' command at the end of each page.
The information we need in already in the config fine (paged=<yes/no>,
page_size=<sz>), so it should not be too difficult to add it.
Ted Roth