[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-chat] Can't program an ATMEGA48 using avrispmkII
From: |
Eddie Dawydiuk |
Subject: |
[avr-chat] Can't program an ATMEGA48 using avrispmkII |
Date: |
Tue, 10 Oct 2006 16:43:30 -0700 (MST) |
Hell all,
I am new to list, I've searched google as well as this mailing list to
find a solution to my problem but so far I have been unable to. During
development I use AVR studio to program my development board. I am now
integrating the programming of the AVR into our production framework. I
installed avrdude version 5.1, initially I was able to program my device
using avrdude. Recently I have found several boards are in a state in
which I can not program them using avrdude. The initial failure condition
is the signature is not properly read.
e.g.
address@hidden:root]#avrdude -p m48 -P usb -c avrispmkII -U
flash:w:/var/ts-production/bitstreams/tsbat3.hex
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0xffffff
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
address@hidden:root]#
Although if I add the -F option the next failure condition is a failure
when writing to flash memory.
address@hidden:root]#avrdude -p m48 -P usb -c avrispmkII -U
flash:w:/var/ts-production/bitstreams/tsbat3.hex -F
avrdude: stk500v2_recv_mk2: error in USB receive
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0xffffff
avrdude: Yikes! Invalid device signature.
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be
performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/var/ts-production/bitstreams/tsbat3.hex"
avrdude: input file /var/ts-production/bitstreams/tsbat3.hex auto detected
as Intel Hex
avrdude: writing flash (3594 bytes):
Writing | # | 1%
0.02savrdude: stk500v2_paged_write: write command failed with 129
Writing | ################################################## | 100% 0.06s
avrdude: failed to write flash memory, rc=-1
avrdude: safemode: Fuses OK
avrdude done. Thank you.
I ran into this several times earlier and I was able to get the boards
into a state where I could program them by using AVR studio and modifying
the ISP frequency. After doing so I found avrdude could properly program
the boards. I've tried to use the -B flag to modify the ISP frequency from
avrdude although this doesn't seem to help. Even worse yet AVR studio no
longer seems to work. The command I have been using that lead to this
problem is listed below.
avrdude -p m48 -P usb -c avrispmkII -v -e -F -u -B 100\
-U flash:w:bitstearm.hex \
-U lfuse:w:0x0E:m \
-U hfuse:w:0xDF:m \
-U efuse:w:0x01:m
One thing to note, I have a known working
board that has only been programmed with AVR studio and I can still
program this board with AVR studio. The other three boards I tried to
program with avrdude are all in this same state where I can't program
them.
Could someone provide any insight, any troubleshooting suggestions? Is
there any more information I could provide that would be helpful?
//Eddie
- [avr-chat] Can't program an ATMEGA48 using avrispmkII,
Eddie Dawydiuk <=