bugAVR C Runtime Library - Bugs: bug #43011, Bug in struct definition of...

 
 

bug #43011: Bug in struct definition of __reg_UCSR1C and __reg_UCSR0C in iom128rfa1.h

Submitted by:  vac <vac>
Submitted on:  Mon 18 Aug 2014 02:37:38 PM UTC  
 
Category: HeaderSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Header files
Status: FixedPercent Complete: 0%
Assigned to: Pitchumani <pitchumani>Open/Closed: Closed
Release: AnyFixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 19 Jun 2015 01:25:13 PM UTC, comment #1:

Removed SPI mode only bits from struct definition of __reg_UCSR1C and __reg_UCSR0C. Removed duplicate defines of UCPHA0, UDORD0, UCPHA1 and UDORD1.

http://svn.savannah.nongnu.org/viewvc?view=rev&root=avr-libc&revision=2477

Pitchumani <pitchumani>
Project MemberIn charge of this item.
Mon 18 Aug 2014 02:37:38 PM UTC, original submission:

There is a bug in iom128rfa1.h file.

Struct definition of __reg_UCSR1C got 10 bits instead of 8:

struct __reg_UCSR1C {
unsigned int ucpol1 : 1; /* Clock Polarity */
unsigned int ucsz1 : 2; /* Character Size */
unsigned int ucpha1 : 1; /* Clock Phase */
unsigned int udord1 : 1; /* Data Order */
unsigned int usbs1 : 1; /* Stop Bit Select */
unsigned int upm1 : 2; /* Parity Mode */
unsigned int umsel1 : 2; /* USART Mode Select */
};

There are two extra bits (ucpha1 and udord1) in definition of register which are used only in MSPIM mode of USART.
Setting for example parity mode (upm1) in result is setting wrong bits: bit 6 and 7 is set instead of bit 4 and 5.

Same applies to __reg_UCSR0C struct.

vac <vac>

 

(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 pitchumani (Updated the item)
  • -unavailable- added by vac (Submitted the item)
  •  

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

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 19 Jun 2015 01:25:13 PM UTCpitchumaniStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Fri 19 Jun 2015 01:10:29 PM UTCpitchumaniStatusNone=>In Progress
      Assigned toNone=>pitchumani

    Back to the top


    Powered by Savane 3.1-cleanup1