Go to the first, previous, next, last section, table of contents.
In general, please report any bugs encountered via
http://savannah.nongnu.org/bugs/?group=avrdude.
-
Problem: I'm using a serial programmer under Windows and get the following
error:
avrdude: serial_open(): can't set attributes for device "com1"
,
Solution: This problem seems to appear with certain versions of Cygwin. Specifying
"/dev/com1"
instead of "com1"
should help.
-
Problem: I'm using linux and my AVR910 programmer is really slow.
Solution (short):
setserial port low_latency
Solution (long):
There are two problems here. First, the system may wait some time before it
passes data from the serial port to the program. Under Linux the following
command works around this (you may need root privileges for this).
setserial port low_latency
Secondly, the serial interface chip may delay the interrupt for some time.
This behaviour can be changed by setting the FIFO-threshold to one. Under Linux this
can only be done by changing the kernel source in drivers/char/serial.c
.
Search the file for UART_FCR_TRIGGER_8
and replace it with UART_FCR_TRIGGER_1
. Note that overall performance might suffer if there
is high throughput on serial lines. Also note that you are modifying the kernel at
your own risk.
-
Problem: I'm not using linux and my AVR910 programmer is really slow.
Solutions: The reasons for this are the same as above.
If you know how to work around this on your OS, please let us know.
-
Problem: Updating the flash ROM from terminal mode does not work with the
JTAG ICEs.
Solution: None at this time. Currently, the JTAG ICE code cannot
write to the flash ROM one byte at a time.
-
Problem: Page-mode programming the EEPROM (using the -U option) does
not erase EEPROM cells before writing, and thus cannot overwrite any
previous value != 0xff.
Solution: None. This is an inherent feature of the way JTAG EEPROM
programming works, and is documented that way in the Atmel AVR
datasheets.
In order to successfully program the EEPROM that way, a prior chip
erase (with the EESAVE fuse unprogrammed) is required.
This also applies to the STK500 and STK600 in high-voltage programming mode.
-
Problem: How do I turn off the DWEN fuse?
Solution: If the DWEN (debugWire enable) fuse is activated,
the /RESET pin is not functional anymore, so normal ISP
communication cannot be established.
There are two options to deactivate that fuse again: high-voltage
programming, or getting the JTAG ICE mkII talk debugWire, and
prepare the target AVR to accept normal ISP communication again.
The first option requires a programmer that is capable of high-voltage
programming (either serial or parallel, depending on the AVR device),
for example the STK500. In high-voltage programming mode, the
/RESET pin is activated initially using a 12 V pulse (thus the
name high voltage), so the target AVR can subsequently be
reprogrammed, and the DWEN fuse can be cleared. Typically, this
operation cannot be performed while the AVR is located in the target
circuit though.
The second option requires a JTAG ICE mkII that can talk the debugWire
protocol. The ICE needs to be connected to the target using the
JTAG-to-ISP adapter, so the JTAG ICE mkII can be used as a debugWire
initiator as well as an ISP programmer. AVRDUDE will then be activated
using the jtag2isp programmer type. The initial ISP
communication attempt will fail, but AVRDUDE then tries to iniate a
debugWire reset. When successful, this will leave the target AVR in a
state where it can accept standard ISP communication. The ICE is then
signed off (which will make it signing off from the USB as well), so
AVRDUDE has to be called again afterwards. This time, standard ISP
communication can work, so the DWEN fuse can be cleared.
The pin mapping for the JTAG-to-ISP adapter is:
JTAG pin | ISP pin |
1 | 3 |
2 | 6 |
3 | 1 |
4 | 2 |
6 | 5 |
9 | 4 |
-
Problem: Multiple USBasp or USBtinyISP programmers connected simultaneously are not
found.
Solution: none at this time. The simplicity of these programmers
doesn't offer a method to distinguish multiple programmers that are
connected simultaneously, so effectively only one of them is supported.
-
Problem: I cannot do ... when the target is in debugWire mode.
Solution: debugWire mode imposes several limitations.
The debugWire protocol is Atmel's proprietary one-wire (plus ground)
protocol to allow an in-circuit emulation of the smaller AVR devices,
using the /RESET line.
DebugWire mode is initiated by activating the DWEN
fuse, and then power-cycling the target.
While this mode is mainly intented for debugging/emulation, it
also offers limited programming capabilities.
Effectively, the only memory areas that can be read or programmed
in this mode are flash ROM and EEPROM.
It is also possible to read out the signature.
All other memory areas cannot be accessed.
There is no
chip erase
functionality in debugWire mode; instead, while reprogramming the
flash ROM, each flash ROM page is erased right before updating it.
This is done transparently by the JTAG ICE mkII (or AVR Dragon).
The only way back from debugWire mode is to initiate a special
sequence of commands to the JTAG ICE mkII (or AVR Dragon), so the
debugWire mode will be temporarily disabled, and the target can
be accessed using normal ISP programming.
This sequence is automatically initiated by using the JTAG ICE mkII
or AVR Dragon in ISP mode, when they detect that ISP mode cannot be
entered.
Go to the first, previous, next, last section, table of contents.