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: Bob Paddock
Subject: Re: [avrdude-dev] Anyone have config section for ATMega325/645?
Date: Thu, 05 Jan 2006 10:45:09 -0500
User-agent: Opera M2/8.50 (Win32, build 7700)

On Wed, 04 Jan 2006 15:37:26 -0500, Joerg Wunsch <address@hidden> 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.
I never have understood Atmel's numbering system.

It would be appreciated if you contributed it.

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

Using this command line:

avrdude -u -p atmega325 -P com3 \
 -c stk500v2 -v -v -U eeprom:w:main.eep \
 -U flash:w:mainAndBootLoader.hex \
 -u -U efuse:w:0xff:m -U hfuse:w:0xD8:m -U lfuse:w:0xBD:m

I get this error:

...
avrdude: input file "main.eep"
avrdude: writing eeprom (457 bytes):
Writing |
stk500v2_paged_write: loadpage instruction not defined for part "ATMEGA325"
Writing | ####...100%
avrdude: failed to write eeprom memory, rc=-1

If I do not try to program the EEPROM the Flash and the fuses program just fine.

This 'loadpage' error seems to becoming from the flash section of
the code.  I do not understand?  There is a EEPROM load page defined
in the datasheet, but I don't see that any other part uses this in
the config file?

#------------------------------------------------------------
# ATmega325
#------------------------------------------------------------

part
    id               = "m325";
    desc             = "ATMEGA325";
    has_jtag         = yes;
#   stk500_devcode   = 0x??;
#   avr910_devcode   = 0x??;
    avr910_devcode   = 0x74;
    pagel            = 0xd7;
    bs2              = 0xa0;
    chip_erase_delay = 9000;
    pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";

    chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 0  0 0 0 0",
                       "0 0 0 0  0 0 0 0    0 0 0 0  0 0 0 0";

    timeout                   = 200;
    stabdelay           = 100;
    cmdexedelay         = 25;
    synchloops          = 32;
    bytedelay           = 0;
    pollindex           = 3;
    pollvalue           = 0x53;
    predelay            = 1;
    postdelay           = 1;
    pollmethod          = 1;

    idr                 = 0x31;
    spmcr               = 0x57;
    allowfullpagebitstream = no;

    memory "eeprom"
        paged           = no; /* leave this "no" */
        page_size       = 4;  /* for parallel programming */
        size            = 1024;
        min_write_delay = 9000;
        max_write_delay = 9000;
        readback_p1     = 0xff;
        readback_p2     = 0xff;
        read            = "  1   0   1   0      0   0   0   0",
                          "  0   0   0   0      x a10  a9  a8",
                          " a7  a6  a5  a4     a3  a2  a1  a0",
                          "  o   o   o   o      o   o   o   o";

        write           = "  1   1   0   0      0   0   0   0",
                          "  0   0   0   0      0 a10  a9  a8",
                          " a7  a6  a5  a4     a3  a2  a1  a0",
                          "  i   i   i   i      i   i   i   i";

        mode            = 0x41;
        delay           = 10;
        blocksize       = 4;
        readsize        = 256;
      ;

    memory "flash"
        paged           = yes;
        size            = 32768;
        page_size       = 128;
        num_pages       = 256;
        min_write_delay = 4500;
        max_write_delay = 4500;
        readback_p1     = 0xff;
        readback_p2     = 0xff;
        read_lo         = "  0   0   1   0      0   0   0   0",
                          "  0 a14 a13 a12    a11 a10  a9  a8",
                          " a7  a6  a5  a4     a3  a2  a1  a0",
                          "  o   o   o   o      o   o   o   o";

        read_hi         = "  0   0   1   0      1   0   0   0",
                          "  0 a14 a13 a12    a11 a10  a9  a8",
                          " a7  a6  a5  a4     a3  a2  a1  a0",
                          "  o   o   o   o      o   o   o   o";

        loadpage_lo     = "  0   1   0   0      0   0   0   0",
                          "  0   0   0   0      0   0   0   0",
                          "  x  a6  a5  a4     a3  a2  a1  a0",
                          "  i   i   i   i      i   i   i   i";

        loadpage_hi     = "  0   1   0   0      1   0   0   0",
                          "  0   0   0   0      0   0   0   0",
                          "  x  a6  a5  a4     a3  a2  a1  a0",
                          "  i   i   i   i      i   i   i   i";

        writepage       = "  0   1   0   0      1   1   0   0",
                          "  0 a14 a13 a12    a11 a10  a9  a8",
                          " a7   x   x   x      x   x   x   x",
                          "  x   x   x   x      x   x   x   x";

        mode            = 0x41;
        delay           = 10;
        blocksize       = 128;
        readsize        = 256;
      ;

    memory "lock"
        size            = 1;
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  0 0 0 0",
                          "x x x x  x x x x   x x o o  o o o o";

        write           = "1 0 1 0  1 1 0 0   1 1 1 0  0 0 0 0",
                          "0 0 0 0  0 0 0 0   1 1 i i  i i i i";
      ;

    memory "lfuse"
        size            = 1;
        read            = "0 1 0 1  0 0 0 0   0 0 0 0  0 0 0 0",
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";

        write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 0 0 0",
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
      ;

    memory "hfuse"
        size            = 1;
        read            = "0 1 0 1  1 0 0 0   0 0 0 0  1 0 0 0",
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";

        write           = "1 0 1 0  1 1 0 0   1 0 1 0  1 0 0 0",
                          "0 0 0 0  0 0 0 0   i i i i  i i i i";
      ;

    memory "efuse"
        size            = 1;

        read            = "0 1 0 1  0 0 0 0  0 0 0 0  1 0 0 0",
                          "0 0 0 0  0 0 0 0  o o o o  o o o o";

        write           = "1 0 1 0  1 1 0 0  1 0 1 0  0 1 0 0",
                          "0 0 0 0  0 0 0 0  1 1 1 1  1 i i i";
      ;

#   ATmega325 has Signature Bytes: 0x1E 0x95 0x05.
    memory "signature"
        size            = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0", "0 0 0 0 0 0 a1 a0 o o o o o o o o";
      ;

    memory "calibration"
        size            = 1;

        read            = "0 0 1 1  1 0 0 0   0 0 0 0  0 0 0 0",
                          "0 0 0 0  0 0 0 0   o o o o  o o o o";
        ;
  ;





reply via email to

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