bugAVR C Runtime Library - Bugs: bug #31267, misleading header iom128rfa1.h

 
 

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

bug #31267: misleading header iom128rfa1.h

Submitter:  Ilya <ibagrak>
Submitted:  Thu 07 Oct 2010 06:48:52 AM UTC
   
 
Category:  Header Severity:  3 - Normal
Priority:  9 - Immediate Item Group:  libc code
Status:  Fixed Assigned to:  joerg_wunsch
Percent Complete:  0% Open/Closed:  Closed
Release:  Unknown Fixed Release:  1.8.1

Wed 28 Dec 2011 09:48:52 PM UTC, comment #3: 

I opened an Atmel bug report for this, requesting the removal
of these vectors from the respective XML file (which is the
base of the header file).

This still leaves the question how to handle IRQ vector slots
that are not implemented in a particular device.  Just not
mention them in the header file?  To the best of my knowledge,
this is the first time we run into that situation.

Joerg Wunsch <joerg_wunsch>
Group administrator
Mon 21 Feb 2011 11:34:21 PM UTC, comment #2: 

Joerg,

Don't you (or the group you're in) have some control over this XML file anyway?

Can't we go ahead and make these changes?

Eric Weddington <arcanum>
Group administrator
Thu 07 Oct 2010 06:54:48 AM UTC, comment #1: 

Well, our policy is that the header file matches the device XML file,
so Atmel would have to change the XML file first.

However, this case is particularly difficult.  As I understand it, the
vector is physically there, so we cannot just omit it from the table,
even though this vector is fairly pointless as it could never trigger.
I suggest to not use any of the interrupt vectors as the decision base
in your case but the control registers: the control registers for
USARTs that cannot be used have been removed, apparently.

Joerg Wunsch <joerg_wunsch>
Group administrator
Thu 07 Oct 2010 06:48:52 AM UTC, original submission:  

I am referring to the file "iom128rfa1.h"

starting at line 5227

    /* USART2, Rx Complete */
    #define USART2_RX_vect                  _VECTOR(51)
    #define USART2_RX_vect_num              51


and at line 5240

    /* USART3, Rx Complete */
    #define USART3_RX_vect                  _VECTOR(54)
    #define USART3_RX_vect_num              54

According to the documentation "doc8266.pdf" page 212 and 213

    "3. Not usefull in ATmega128RFA1 due to limited pin count."

Therefore this chip does NOT have uart2 and uart3

When writing code to work on multiple CPUs, many people use #if defined() to determine if a feature is available or not.

I had in my code

    #if defined(USART3_RX_vect)
        ...
    #endif

to determine if USART3 is present. Therefore my code tried to use USART3 but it was not present.

Therefore the .h file contradicts the documentation. In this case the documentation is correct and the .h file is misleading

Ilya <ibagrak>

 

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

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-03 joerg_wunsch Fixed ReleaseNone 1.8.1
    2013-05-03 joerg_wunsch StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2012-11-16 arcanum Priority5 - Normal 9 - Immediate
    2011-12-28 joerg_wunsch StatusNone In Progress
    2011-02-21 arcanum Assigned toNone joerg_wunsch
    2010-10-07 ibagrak Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code