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

 
 

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

Submitted by:  Juergen Weigert <jnweiger>
Submitted on:  Sun 21 Sep 2008 12:18:30 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: InvalidPercent Complete: 0%
Assigned to: Eric Weddington <arcanum>Open/Closed: Closed
Release: 1.6.2Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 22 Sep 2008 08:04:52 PM UTCarcanumStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Sun 21 Sep 2008 10:05:35 PM UTCarcanumAssigned toNone=>arcanum

    Back to the top


    Powered by Savane 3.1-cleanup1