bugAVR C Runtime Library - Bugs: bug #30552, Missing definition ADCW

 
 

bug #30552: Missing definition ADCW

Submitted by:  Frédéric Nadeau <fnadeau>
Submitted on:  Mon 26 Jul 2010 03:55:52 PM UTC  
 
Category: HeaderSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Header files
Status: FixedPercent Complete: 100%
Assigned to: Anitha Boyapati <aboyapati>Open/Closed: Closed
Release: 1.7.0Fixed Release: 1.6.1

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 22 Sep 2010 06:51:53 AM UTC, comment #2:

For device ATTiny43U:
the patch given for bug30569 defines ADC and ADCW to 0x04 (using _SFR_MEM16 macro) while datasheet clearly says that address of ADCL is 0x24 and that of ADCH is 0x25.

The following diff uses _SFR_IO16 instead of _SFR_MEM16. _SFR_IO16 adds an offset of 0x20. I think this is appropriate.

Index: iotn43u.h
===================================================================
--- iotn43u.h (revision 2184)
+++ iotn43u.h (working copy)
@@ -74,7 +74,10 @@
#define ADLAR 4
#define ACME 6

+#ifndef ASSEMBLER
#define ADC _SFR_IO16(0x04)
+#endif
+#define ADCW _SFR_IO16(0x04)

#define ADCL _SFR_IO8(0x04)

Anitha Boyapati <aboyapati>In charge of this item.
Tue 21 Sep 2010 11:37:55 AM UTC, comment #1:

A patch has been submitted for bug 30569 and covers the issue. https://savannah.nongnu.org/bugs/?30569

Frédéric Nadeau <fnadeau>
Mon 26 Jul 2010 03:55:52 PM UTC, original submission:

Found in SVN revision 2179

Most device that have ADCL and ADCH registers also have this
#ifndef _ASSEMBLER_
#define ADC _SFR_MEM16(0x??)
#endif
#define ADCW _SFR_MEM16(0x??)

whereas the following only define this:
#define ADC _SFR_MEM16(0x??)

Affected header are:
iom32u4.h
iotn43u.h

I came across this issue because ADCW is in iom16u4.h but not iom32u4.h although they both use the same PDF datasheet.

I know headers are generated from Atmel AVR Studio XML, is this something related to a bug in the XML?

Frédéric Nadeau <fnadeau>

 

(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 aboyapati (Posted a comment)
  • -unavailable- added by fnadeau (Submitted the item)
  •  

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

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 22 Sep 2010 03:55:27 PM UTCaboyapatiStatusNone=>Fixed
      Percent Complete0%=>100%
      Assigned toNone=>aboyapati
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.6.1

    Back to the top


    Powered by Savane 3.1-cleanup1