avr-libc icon indicating copy to clipboard operation
avr-libc copied to clipboard

[bug #36350] FUSE4_DEFAULT wrong for Xmega A devices

Open avrs-admin opened this issue 3 years ago • 3 comments

Mon 30 Apr 2012 01:50:42 PM CEST

j@uriah 55% fgrep FUSE4_DEFAULT include/avr/iox* include/avr/iox128a1.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox128a3.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox128d3.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox16a4.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox16d4.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox192a3.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox192d3.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox256a3.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox256a3b.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox256d3.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox32a4.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox32d4.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox64a1.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox64a3.h:#define FUSE4_DEFAULT  (0xFF) include/avr/iox64d3.h:#define FUSE4_DEFAULT  (0xFF)

Xmega A (as well as Xmega B) device have JTAGEN programmed in FUSE4, so their default ought to be 0xFE.

This bug results in an application using:

FUSES = { .FUSEBYTE0 = FUSE0_DEFAULT, .FUSEBYTE1 = FUSE1_DEFAULT, .FUSEBYTE2 = FUSE2_DEFAULT, .FUSEBYTE4 = FUSE4_DEFAULT, .FUSEBYTE5 = FUSE5_DEFAULT, };

and then accidentally programming all fuses (like through the "ELF production file" in AVR Studio) in a batch erroneously turngin off their JTAG access.

This issue was migrated from https://savannah.nongnu.org/bugs/?36350

avrs-admin avatar Jan 31 '22 00:01 avrs-admin

Fri 30 Nov 2012 08:04:40 PM CET

While you're at it, It seems to me that FUSE1_DEFAULT is also incorrect. in iox128a1.h, it is defined as 0xFF However, the xmega manual describes it to be 0x00. Unfortunately I don't have hardware to verify this.

avrs-admin avatar Jan 31 '22 00:01 avrs-admin

Erik Walthinsen Sat 01 Dec 2012 06:17:44 PM CET

Just FYI, here's what I read off a fresh 128a3u that I've never messed with the fuses on:

fuse0: 0xff fuse1: 0x00 fuse2: 0xff fuse4: 0xfe fuse5: 0xff

avrs-admin avatar Jan 31 '22 00:01 avrs-admin

Sat 07 Sep 2019 08:51:31 PM CEST

I see these on a fresh xmega32a4u:

fuse1: 0x00 fuse2: 0xff fuse4: 0xfe fuse5: 0xff

avrs-admin avatar Jan 31 '22 00:01 avrs-admin