bugAVR C Runtime Library - Bugs: bug #24323, many headers define EFUSE_DEFAULT...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #24323: many headers define EFUSE_DEFAULT as 0xff inconsistently

Submitter:  Juergen Weigert <jnweiger>
Submitted:  Sun 21 Sep 2008 12:18:30 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid Assigned to:  arcanum
Percent Complete:  0% Open/Closed:  Closed
Release:  1.6.2 Fixed Release:  None

Mon 22 Sep 2008 07:26:31 PM UTC, comment #2: 

You are right.
I missed the '~' in ~_BV(), sorry.

Please close as invalid.

Juergen Weigert <jnweiger>
Sun 21 Sep 2008 10:05:35 PM UTC, comment #1: 

You are incorrect. All fuse values use inverted logic where 1=unprogrammed, 0=programmed, including LFUSE_DEFAULT, HFUSE_DEFAULT, and EFUSE_DEFAULT, even when it is defined as 0xFF.

If there are mistakes in the default values, then we need to specifically get those fixed.

Eric Weddington <arcanum>
Group administrator
Sun 21 Sep 2008 12:18:30 AM UTC, original submission:  

LFUSE_DEFAULT and HFUSE_DEFAULT in avr/io*.h are defined using noninverted bit values (unprogrammed=0, programmed=1),
[this is mildly confusing, but okay as long as it is consistent. all other reference to fuse bits use an inverted logic of programmed=0, unprogrammed=1.]

EFUSE_DEFAULT is inconsistent. We often see 0xff which is meant as representing the inverted logic. But whenever EFUSE is not 0xff, it uses noninverted logic, just like L and H-Fuse.

Example:
Compare default of bit 0 in e-fuse of mega48 and mega88:
The manual doc2545p280f says 1=unprogrammed for both devices, but the headers define a 1 for mega48 and a 0 for mega88.

Can we assume that nobody really uses the xFUSE_DEFAULT values? If so, I'd suggest to make them all inverted logic.
(yes, that would bit-flip all xFUSE_DEFAULTs, except where efuse has 0xff)
If that sounds too scary, let us achive consistency by
#define EFUSE_DEFAULT 0x00 where it is now 0xff.

Juergen Weigert <jnweiger>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arcanum (Posted a comment)
  • -email is unavailable- added by jnweiger (Submitted the item)
  •  

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-09-22 arcanum StatusNone Invalid
        Open/ClosedOpen Closed
    2008-09-21 arcanum Assigned toNone arcanum

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code