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

 
 

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

bug #30552: Missing definition ADCW

Submitter:  Frédéric Nadeau <fnadeau>
Submitted:  Mon 26 Jul 2010 03:55:52 PM UTC
   
 
Category:  Header Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Header files
Status:  Fixed Assigned to:  aboyapati
Percent Complete:  100% Open/Closed:  Closed
Release:  1.7.0 Fixed Release:  1.6.1

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>
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.)

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

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-09-22 aboyapati StatusNone Fixed
        Percent Complete0% 100%
        Assigned toNone aboyapati
        Open/ClosedOpen Closed
        Fixed ReleaseNone 1.6.1

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code