avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] JTAG ICE3 bug - all fuses map to fuse0? (xmega32a4u)


From: Ing. Daniel Rozsnyó
Subject: [avrdude-dev] JTAG ICE3 bug - all fuses map to fuse0? (xmega32a4u)
Date: Mon, 24 Jun 2013 18:38:26 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121026 Thunderbird/16.0.2

Hi,
I am programming my boards with the advised JTAG ICE3 programmer in PDI mode, the chip is:


part parent "x32a4"
    id          = "x32a4u";
    desc        = "ATxmega32A4U";
    has_pdi     = yes;
;


I want only to modify the bootloader bit, so that it will start automatically, which is Fuse2 = 0xBF, in makefile:


PROGDEV=jtag3pdi
AVRDUDE=avrdude
AVROPTS=-p $(MCUVER) -c $(PROGDEV)


fuse :
        $(AVRDUDE) $(AVROPTS) -U fuse2:w:0xBF:m


But when I read back the fuses using:

avrdude -c jtag3pdi -p atxmega32a4u -U fuse0:r:-:h
avrdude -c jtag3pdi -p atxmega32a4u -U fuse1:r:-:h
avrdude -c jtag3pdi -p atxmega32a4u -U fuse2:r:-:h
avrdude -c jtag3pdi -p atxmega32a4u -U fuse4:r:-:h
avrdude -c jtag3pdi -p atxmega32a4u -U fuse5:r:-:h

All say:

avrdude: writing output file "<stdout>"
0xbf

What we have noticed with a Chinese AVRISP mkII hardware and a windows control program, is that the 0xBF is residing only in fuse0, which is wrong.



The -vvvv gives me for fuse0:



avrdude: Sending read memory command:
avrdude: jtag3_send(): sending 12 bytes
avrdude: Sent: . [0e] . [00] . [10] . [00] . [12] ! [21] . [00] . [b2] . [00] . [00] . [00] . [00] . [01] . [00] . [00] . [00]
avrdude: jtag3_recv():
avrdude: Recv: . [0e] . [10] . [00] . [12] . [84] . [00] . [bf] . [00]
avrdude: jtag3_recv(): Got message seqno 16 (command_sequence == 16)

Raw message:
12  84  00  bf  00
[AVR] Data returned:
0x00 0xbf 0x00
Reading | ################################################## | 100% 0.00s

avrdude: writing output file "<stdout>"
0xbf



and for fuse2:

avrdude: jtag3_send(): sending 12 bytes
avrdude: Sent: . [0e] . [00] . [10] . [00] . [12] ! [21] . [00] . [b2] . [00] . [00] . [00] . [00] . [01] . [00] . [00] . [00]
avrdude: jtag3_recv():
avrdude: Recv: . [0e] . [10] . [00] . [12] . [84] . [00] . [bf] . [00]
avrdude: jtag3_recv(): Got message seqno 16 (command_sequence == 16)

Raw message:
12  84  00  bf  00
[AVR] Data returned:
0x00 0xbf 0x00
Reading | ################################################## | 100% 0.00s

avrdude: writing output file "<stdout>"
0xbf




For me, that seems wrong in the "Sent:" phase, as there is no difference between reading different fuse bytes.

The config file is using multiple parents (.xmegasmall, .xmega) and the fuses are defined with different offsets, however the -v results in 5x:

fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00

and -vv in 5x:

Block Poll Page Polled Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- --------- fuse0 0 0 0 0 no 1 0 0 0 0 0x00 0x00


Not mentioning the actual offsets.

Daniel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]