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: Sat, 7 Jan 2006 23:12:34 +0100
User-agent: Mutt/1.4.2.1i

As Bob Paddock wrote:

> > interested in that...  My guess is the code should query m->paged
> > instead of using undocumented operations on m->mode.

> I'll try that on Monday, thank you.

I tried it, no, it doesn't work.  The code is right, if the STK500v2
is told to use page access (bit 0 in the "mode" byte), the page access
instructions need to be used. I added the following to the EEPROM
section of the ATmega169 definition (as this is a device I just happen
to have access at here):

        loadpage_lo     = "  1   1   0   0      0   0   0   1",
                          "  0   0   0   0      0   0   0   0",
                          "  0   0   0   0      0   0  a1  a0",
                          "  i   i   i   i      i   i   i   i";

        writepage       = "  1   1   0   0      0   0   1   0",
                          "  0   0   x   x      x   x   x  a8",
                          " a7  a6  a5  a4     a3  a2   0   0",
                          "  x   x   x   x      x   x   x   x";

With that, I can write to the EEPROM using the -U command-line option.
Even then, trying to use byte-level access (from within terminal mode)
fails.  That means avrdude needs to be tweaked quite a bit in order to
handle page-organized EEPROMs at all.  I didn't really try flash
writes from terminal mode for modern AVRs, I guess they suffer from
the same problem.

In the end, I think avrdude needs to be restructured quite a bit to
cope with that.  While I started to cache pages inside the JTAG ICE
code, that might probably be generalized for any memory area that is
organized in pages, and byte-wide writes to page-organized memories
can then be handled intelligently.

For the time being, it would not hurt to at least add the above
instructions to the EEPROM sections of all devices that are affected.

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