JTAG ICE3 bug - all fuses map to fuse0? (xmega32a4u)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JTAG ICE3 bug - all fuses map to fuse0? (xmega32a4u)

Daniel Rozsnyó
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

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev
Reply | Threaded
Open this post in threaded view
|

Re: JTAG ICE3 bug - all fuses map to fuse0? (xmega32a4u)

Joerg Wunsch
As "Ing. Daniel Rozsnyó" wrote:

> 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

This has already been reported:

https://savannah.nongnu.org/bugs/?38580

It contains a patch, so you might want to give it a try.
--
cheers, Joerg               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
avrdude-dev mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/avrdude-dev