bugAVR C Runtime Library - Bugs: bug #18818, ATMega644P missing second USART...

 
 

bug #18818: ATMega644P missing second USART erroneously

Submitted by:  None
Submitted on:  Thu 18 Jan 2007 12:21:42 PM UTC  
 
Category: HeaderSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Header files
Status: InvalidPercent Complete: 0%
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Email: -unavailable-
Open/Closed: ClosedRelease: None
Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 21 Jan 2007 09:11:30 PM UTC, comment #3:

Confusing comment has been fixed in that header file.

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Fri 19 Jan 2007 12:50:20 AM UTC, comment #2:

You're right.

What happened was I never bothered to check if it really works, fooled by the absence of 'p' in the individual header files, coupled with this line in iomxx4.h:

/*

  • Only ATmega164/324 have a second USART.

*/

I may be partly absolved by that slight glitch in the documentation, but nevertheless I shall repent my rather blatant foolishness.

Tero Sinervo <tvjsin>
Thu 18 Jan 2007 01:18:16 PM UTC, comment #1:

Works as designed:

$252% cat > foo.c
#include <avr/io.h>

void foo(void)
{
UCSR1A = 42;
}
^D
$ avr-gcc -mmcu=atmega644p -c foo.c
$ avr-gcc -mmcu=atmega644 -c foo.c
foo.c: In function 'foo':
foo.c:5: error: 'UCSR1A' undeclared (first use in this function)
foo.c:5: error: (Each undeclared identifier is reported only once
foo.c:5: error: for each function it appears in.)

Are you perhaps using an obsolete version of compiler and/or
library?

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Thu 18 Jan 2007 12:21:42 PM UTC, original submission:

There's a slight problem with ATMega644P and ATMega644 in the iomxx4.h header file. ATMega644 has only one USART, which is correct, but ATMega644P should have two USARTs. avr-libc seems to see both devices as the same device which they apparently are not. Even the paratetric product table at http://www.atmel.com says that ATMega644P has only one USART, but the datasheet says otherwise.

Suggested solution: recognize ATMega164P, ATMega324P and ATMega644P as their own product family and isolate ATMega644 from it. This means adding the 'p' letter to the processors' individual headers as is already done with ATMega196 and ATMega169P. iom644.h should perhaps not be part of this family. The ATMega644 and ATMega644P should probably be seen as different devices.

Anonymous

 

(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 tvjsin (Posted a comment)
  • -unavailable- added by joerg_wunsch (Posted a comment)
  •  

    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
    Sun 21 Jan 2007 09:11:30 PM UTCjoerg_wunschOpen/ClosedOpen=>Closed
    Thu 18 Jan 2007 01:18:16 PM UTCjoerg_wunschStatusNone=>Invalid
      Assigned toNone=>joerg_wunsch

    Back to the top


    Powered by Savane 3.1-cleanup1