avrdude-dev
[Top][All Lists]
Advanced

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

Re: [avrdude-dev] Anyone have config section for ATMega325/645?


From: Joerg Wunsch
Subject: Re: [avrdude-dev] Anyone have config section for ATMega325/645?
Date: Fri, 6 Jan 2006 23:28:32 +0100
User-agent: Mutt/1.4.2.1i

As Bob Paddock wrote:

> >You're right, 165/325x/645x support is missing.

> The Mega165 is the Mega169 without the LCD controller to
> my knowledge, it is not related to the Mega325x/645x.

But then, the Mega325x/645x are nothing else but Mega329x/649x without
an LCD controller.  I know that the 169 and 329/649 don't belong to
the same family, but they are even binary compatible, e.g. I can use
the ATmega169 firmware of an STK502 in an ATmega329 chip.

> >It would be appreciated if you contributed it.

> Here it is, but I'm having an odd problem with it.

Thanks, I'll see to add that.

> I get this error:

> stk500v2_paged_write: loadpage instruction not defined for part "ATMEGA325"

I've seen that before...

> This 'loadpage' error seems to becoming from the flash section of
> the code.

I think it's from the EEPROM section, as this message only triggers
when writing the EEPROM from the command-line.

This relates to the following piece of code in stk500v2.c:

  // if the memory is paged, load the appropriate commands into the buffer
  if (m->mode & 0x01) {
    commandbuf[3] = m->mode | 0x80;             // yes, write the page to flash

    if (m->op[AVR_OP_LOADPAGE_LO] == NULL) {
      fprintf(stderr, "%s: stk500v2_paged_write: loadpage instruction not 
defined for part \"%s\"\n",
              progname, p->desc);
      return -1;
    }

Now, for modern chips, m->mode indicates even the EEPROM can be used
in paged mode.  However, normally avrdude doesn't want to use paged
mode for EEPROM, and indicates that by setting the "paged" attribute
in the EEPROM section to "no".  The STK500v2 code doesn't seem to be
interested in that...  My guess is the code should query m->paged
instead of using undocumented operations on m->mode.

-- 
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]