Hi,
I am trying to upload bootloader using arduino isp as programmer. it is giving random issues:
- some times it reads random device signature
- sometimes it reads correct signature but not able to read fuse bit. e.g., the 3rd safemode read operation of fails
- device signature is mostly 0x000000, but different values are also coming.
- sometimes everything goes fine but at the end during verify mismatch occurs at random position.
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xff != 0x00
avrdude: verification error; content mismatch
avrdude: Send: Q [51] [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
avrdude done. Thank you.
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.08s
avrdude: Device signature = 0x1e931e
avrdude: Expected signature for ATMEGA8 is 1E 93 07
Double check chip, or use -F to override this check.
avrdude done. Thank you.
G:\debojit\electronics project\arduino-1.0.4-windows\arduino-1.0.4\hardware\tools\avr\bin>avrdude -C ..\etc\avrdude.conf -v -v -v -p atmega8 -c stk500v1 -P \\.\COM2 -b 19200
avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "..\etc\avrdude.conf"
Using Port : \\.\COM2
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATMEGA8
Chip Erase delay : 10000 us
PAGEL : PD7
BS2 : PC2
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 4 20 128 0 no 512 4 0 9000 9000 0xff 0xff
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
calibration 0 0 0 0 no 4 0 0 0 0 0x00 0x00
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.09s
avrdude: Device signature = 0x1e9307
avrdude: safemode read 1, lfuse value: bf
avrdude: safemode read 2, lfuse value: bf
avrdude: safemode read 3, lfuse value: bf
avrdude: safemode: lfuse reads as BF
avrdude: safemode read 1, hfuse value: dc
avrdude: safemode read 2, hfuse value: dc
avrdude: safemode read 3, hfuse value: dc
avrdude: safemode: hfuse reads as DC
avrdude: current erase-rewrite cycle count is -18 (if being tracked)
avrdude: safemode read 1, lfuse value: bf
avrdude: safemode read 2, lfuse value: bf
avrdude: safemode read 3, lfuse value: bf
avrdude: safemode: lfuse reads as BF
avrdude: safemode read 1, hfuse value: dc
avrdude: safemode read 2, hfuse value: dc
avrdude: safemode read 3, hfuse value: dc
avrdude: safemode: hfuse reads as DC
avrdude: safemode: Fuses OK
avrdude done. Thank you.
How should i fix these.
Note: i am using disable reset on serial connection, and added 10 between rst and Vin of the target arduino. Also 16 mhz as xtal. I am trying to upload optiboot bootloader.
Thanks,
Debojit