[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] AVRDUDE and ATtiny2313?
From: |
Bob Paddock |
Subject: |
[avr-gcc-list] AVRDUDE and ATtiny2313? |
Date: |
Wed, 14 Apr 2004 14:00:18 -0400 |
User-agent: |
Opera7.23/Win32 M2 build 3227 |
I'm working with some samples of the ATtiny2313 on a STK500 board.
I've found a couple of issues I don't know how to resolve.
The ATtiny2313 will *ONLY* program if I have the STK500 board frequency
set to
1.23 MHz. Any slower and the STK500 thinks you have a empty socket, any
faster
the results are random.
There does not seem to be a way to set the STK500 frequency from the
AVRDUDE
command line?
You can set the frequency if you go in to AVRDUDE terminal mode. The
problem
is that "you can't get there from here". AVRDUDE tires to read the
signature of
the part at start up before going in to the terminal mode, unless you use
the
-F "Force" parameter. Once forced in to the terminal mode you can set the
frequency, but nothing works, such as reading the Tiny2313 signature.
The signature always reads back as 0xFFFFFF.
To get AVRDUDE working with the STK500 I have to run AVR Studio to set the
board frequency, any time I cycle power to the STK500.
The second problem that I'm having is that I want to use the "pony-stk500"
board, rather than the STK500. When I try the pony-stk500, I get back a
signature of 0x0000102 rather than the correct 0x1E910A.
Verification always fails, as I would expect.
I'm guessing that I have the wrong avr910_devcode. Any one know what it
would be for the Tiny2313?
The reset pin operation depends on the setting of the fuse bits,
does that make reset dedicated or io?
## Reset depends on fuse setting, which one is right?
## reset = dedicated;
## reset = io;
Any suggestions for these problems?
Here is the ATtiny2313 config file that I created.
#------------------------------------------------------------
# ATtiny2313
#------------------------------------------------------------
part
id = "t2313";
desc = "ATtiny2313";
stk500_devcode = 0x23;
## avr910_devcode = ?;
## Try the AT90S2313 devcode:
avr910_devcode = 0x20;
pagel = 0xD4;
bs2 = 0xD6;
## Reset depends on fuse setting, which one is right?
## reset = dedicated;
## reset = io;
chip_erase_delay = 9000;
pgm_enable = "1 0 1 0 1 1 0 0 0 1 0 1 0 0 1 1",
"x x x x x x x x x x x x x x x x";
chip_erase = "1 0 1 0 1 1 0 0 1 0 0 x x x x x",
"x x x x x x x x x x x x x x x x";
memory "eeprom"
size = 128;
min_write_delay = 4000;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read = "1 0 1 0 0 0 0 0 0 0 0 x x x x x",
"x 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 x x x x x",
"x a6 a5 a4 a3 a2 a1 a0 i i i i i i i i";
;
memory "flash"
paged = yes;
size = 2048;
page_size = 32;
num_pages = 64;
min_write_delay = 4000;
max_write_delay = 4500;
readback_p1 = 0xff;
readback_p2 = 0xff;
read_lo = " 0 0 1 0 0 0 0 0",
" 0 0 0 0 0 0 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 0 0 0 0 0 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 x x x x x",
" x x 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 x x x x x",
" x x a5 a4 a3 a2 a1 a0",
" i i i i i i i i";
writepage = " 0 1 0 0 1 1 0 0",
" 0 0 0 0 0 0 a9 a8",
" a7 a6 x x x x x x",
" x x x x x x x x";
;
# ATtiny2313 has Signature Bytes: 0x1E 0x91 0x0A.
memory "signature"
size = 3;
read = "0 0 1 1 0 0 0 0 0 0 0 x x x x
x",
"x x x x x x a1 a0 o o o o o o o o";
;
memory "lock"
size = 1;
write = "1 0 1 0 1 1 0 0 1 1 1 x x x x x",
"x x x x x x x x 1 1 i i i i i i";
;
memory "lfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";
;
memory "hfuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 1 0 0 0",
"x x x x x x x x i i i i i i i i";
read = "0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
;
memory "efuse"
size = 1;
write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
"x x x x x x x x x x x x x x x i";
read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
"x x x x x x x x o o o o o o o o";
;
memory "calibration"
size = 4;
read = "0 0 1 1 1 0 0 0 0 0 0 x x x x x",
"0 0 0 0 0 0 0 0 o o o o o o o o";
;
;
# AVR Studio 4.08 Build 310, Service Pack one defaults to:
# HighFuse: 0x99, ExtendedFuse: 0xff, LowFuse: 0xE1, Lockbits: 0xFF
- [avr-gcc-list] AVRDUDE and ATtiny2313?,
Bob Paddock <=