[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] EEPROM fails verification on ATmega645 with pony-stk20
From: |
Bob Paddock |
Subject: |
Re: [avrdude-dev] EEPROM fails verification on ATmega645 with pony-stk200 hardware? |
Date: |
Thu, 13 Jul 2006 21:02:16 -0400 |
User-agent: |
KMail/1.9.1 |
On Friday 26 May 2006 14:38, Bob Paddock wrote:
> I have been developing my code with a STK500 (stk500v2), using an
> ATMega645.
> No issues with programming anything. EEPROM, Flash and fuses
> all program fine.
> Today I moved over to a pony-stk200 that production uses
> (much cheaper to replace when they kill it), and I can
> not get the EEPROM to program in any of my boards when
> using the pony-stk200 hardware. The Flash and Fuses
> still program just fine with the pony-stk200.
I had some more time to look at the problem today.
Can someone please explain to me this sequence of events?:
avrdude: reading input file "main.eep"
avrdude: input file main.eep auto detected as Intel Hex
avrdude: writing eeprom (579 bytes):
Writing | bitbang_cmd(): [ A0 00 00 00 ] [ 00 A0 00 FF ]
bitbang_cmd(): [ C1 00 00 09 ] [ 00 C1 00 00 ]
bitbang_cmd(): [ A0 00 00 00 ] [ 09 A0 00 FF ]
bitbang_cmd(): [ A0 00 00 00 ] [ 00 A0 00 FF ]
[Repeated 136 more times.]
First line is a read of EEPROM address 0000, which contains 0xFF.
I'm ok with that.
Next line of C1...09 is write to EEPROM pageload register with data of 0x09
at address 0x0000. Not sure why pageload is being invoked here rather than
EEPROM write of 0xC0?
Next line is again a read of EEPROM address 0000, which still contains 0xFF,
just as it should since EEPROM page-write has never been issued.
Is that a valid sequence of events? I did not think you could read what was
in the page register??
More than you ever wanted to see below:
avrdude -u -p atmega645 -P lpt1 -c pony-stk200 -v -v -v -U eeprom:w:main.eep
Programmer Type : PPI
Description : Pony Prog STK200
VCC = 0x00 (not used)
BUFF = 0x0c = pins 4,5
RESET = 9
SCK = 6
MOSI = 7
MISO = 10
ERR LED = 0
RDY LED = 0
PGM LED = 8
VFY LED = 0
bitbang_cmd(): [ AC 53 00 00 ] [ FF FE 53 00 ]
avrdude: AVR device initialized and ready to accept instructions
Reading | bitbang_cmd(): [ 30 00 00 00 ] [ 00 30 00 1E ]
bitbang_cmd(): [ 30 00 01 00 ] [ 00 30 00 96 ]
################bitbang_cmd(): [ 30 00 02 00 ] [ 00 30 00 05 ]
################################## | 100% 0.00s
avrdude: Device signature = 0x1e9605
bitbang_cmd(): [ A0 07 FC 00 ] [ 00 A0 07 FF ]
bitbang_cmd(): [ A0 07 FD 00 ] [ 00 A0 07 FF ]
bitbang_cmd(): [ A0 07 FE 00 ] [ 00 A0 07 FF ]
bitbang_cmd(): [ A0 07 FF 00 ] [ 00 A0 07 FF ]
avrdude: reading input file "main.eep"
avrdude: input file main.eep auto detected as Intel Hex
avrdude: writing eeprom (579 bytes):
Writing | bitbang_cmd(): [ A0 00 00 00 ] [ 00 A0 00 FF ]
bitbang_cmd(): [ C1 00 00 09 ] [ 00 C1 00 00 ]
bitbang_cmd(): [ A0 00 00 00 ] [ 09 A0 00 FF ]
bitbang_cmd(): [ A0 00 00 00 ] [ 00 A0 00 FF ]
bitbang_cmd(): [ A0 00 00 00 ] [ 00 A0 00 FF ]
System wide configuration file is "G:\WINAVR~1\BIN\avrdude.conf"
Using Port : lpt1
Using Programmer : pony-stk200
AVR Part : ATMEGA645
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page
Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW
MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ -----
----- ---------
eeprom 65 10 8 0 no 2048 8 0 9000
9000 0xff 0xff
Memory Ops:
Oeration Inst Bit Bit Type Bitno Value
----------- -------- -------- ----- -----
READ 31 VALUE 7 1
30 VALUE 6 0
29 VALUE 5 1
28 VALUE 4 0
27 VALUE 3 0
26 VALUE 2 0
25 VALUE 1 0
24 VALUE 0 0
23 VALUE 7 0
22 VALUE 6 0
21 VALUE 5 0
20 VALUE 4 0
19 VALUE 3 0
18 ADDRESS 10 0
17 ADDRESS 9 0
16 ADDRESS 8 0
15 ADDRESS 7 0
14 ADDRESS 6 0
13 ADDRESS 5 0
12 ADDRESS 4 0
11 ADDRESS 3 0
10 ADDRESS 2 0
9 ADDRESS 1 0
8 ADDRESS 0 0
7 OUTPUT 7 0
6 OUTPUT 6 0
5 OUTPUT 5 0
4 OUTPUT 4 0
3 OUTPUT 3 0
2 OUTPUT 2 0
1 OUTPUT 1 0
0 OUTPUT 0 0
WRITE 31 VALUE 7 1
30 VALUE 6 1
29 VALUE 5 0
28 VALUE 4 0
27 VALUE 3 0
26 VALUE 2 0
25 VALUE 1 0
24 VALUE 0 0
23 VALUE 7 0
22 VALUE 6 0
21 VALUE 5 0
20 VALUE 4 0
19 VALUE 3 0
18 ADDRESS 10 0
17 ADDRESS 9 0
16 ADDRESS 8 0
15 ADDRESS 7 0
14 ADDRESS 6 0
13 ADDRESS 5 0
12 ADDRESS 4 0
11 ADDRESS 3 0
10 ADDRESS 2 0
9 ADDRESS 1 0
8 ADDRESS 0 0
7 INPUT 7 0
6 INPUT 6 0
5 INPUT 5 0
4 INPUT 4 0
3 INPUT 3 0
2 INPUT 2 0
1 INPUT 1 0
0 INPUT 0 0
LOADPAGE_LO 31 VALUE 7 1
30 VALUE 6 1
29 VALUE 5 0
28 VALUE 4 0
27 VALUE 3 0
26 VALUE 2 0
25 VALUE 1 0
24 VALUE 0 1
23 VALUE 7 0
22 VALUE 6 0
21 VALUE 5 0
20 VALUE 4 0
19 VALUE 3 0
18 VALUE 2 0
17 VALUE 1 0
16 VALUE 0 0
15 VALUE 7 0
14 VALUE 6 0
13 VALUE 5 0
12 VALUE 4 0
11 VALUE 3 0
10 ADDRESS 2 0
9 ADDRESS 1 0
8 ADDRESS 0 0
7 INPUT 7 0
6 INPUT 6 0
5 INPUT 5 0
4 INPUT 4 0
3 INPUT 3 0
2 INPUT 2 0
1 INPUT 1 0
0 INPUT 0 0
WRITEPAGE 31 VALUE 7 1
30 VALUE 6 1
29 VALUE 5 0
28 VALUE 4 0
27 VALUE 3 0
26 VALUE 2 0
25 VALUE 1 1
24 VALUE 0 0
23 VALUE 7 0
22 VALUE 6 0
21 VALUE 5 0
20 VALUE 4 0
19 VALUE 3 0
18 ADDRESS 10 0
17 ADDRESS 9 0
16 ADDRESS 8 0
15 ADDRESS 7 0
14 ADDRESS 6 0
13 ADDRESS 5 0
12 ADDRESS 4 0
11 ADDRESS 3 0
10 VALUE 2 0
9 VALUE 1 0
8 VALUE 0 0
7 IGNORE 7 0
6 IGNORE 6 0
5 IGNORE 5 0
4 IGNORE 4 0
3 IGNORE 3 0
2 IGNORE 2 0
1 IGNORE 1 0
0 IGNORE 0 0
Block Poll Page
Polled
> Today I moved over to a pony-stk200 that production uses
> (much cheaper to replace when they kill it), and I can
> not get the EEPROM to program in any of my boards when
> using the pony-stk200 hardware. The Flash and Fuses
> still program just fine with the pony-stk200.
>
> This is with AvrDude 5.1 on Windows.
> avrdude.conf:
>
> #------------------------------------------------------------
> # ATmega645
> #------------------------------------------------------------
>
> part
> id = "m645";
> desc = "ATMEGA645";
> has_jtag = yes;
> # stk500_devcode = 0x??; # No STK500v1 support?
> # avr910_devcode = 0x??; # Try the ATmega16 one
> 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 = 8; /* for parallel programming */
> size = 2048;
> 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 0 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";
>
> loadpage_lo = " 1 1 0 0 0 0 0 1",
> " 0 0 0 0 0 0 0 0",
> " 0 0 0 0 0 a2 a1 a0",
> " i i i i i i i i";
>
> writepage = " 1 1 0 0 0 0 1 0",
> " 0 0 0 0 0 a10 a9 a8",
> " a7 a6 a5 a4 a3 0 0 0",
> " x x x x x x x x";
>
> mode = 0x41;
> delay = 10;
> blocksize = 8;
> readsize = 256;
> ;
>
> memory "flash"
> paged = yes;
> size = 65536;
> page_size = 256;
> 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",
> " a15 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",
> " a15 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",
> " a7 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",
> " a7 a6 a5 a4 a3 a2 a1 a0",
> " i i i i i i i i";
>
> writepage = " 0 1 0 0 1 1 0 0",
> " a15 a14 a13 a12 a11 a10 a9 a8",
> " a7 a6 a5 a4 a3 a2 a1 a0",
> " 0 0 0 0 0 0 0 0";
>
> 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";
> ;
>
> # ATmega645 has Signature Bytes: 0x1E 0x96 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";
- Re: [avrdude-dev] EEPROM fails verification on ATmega645 with pony-stk200 hardware?,
Bob Paddock <=