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

 
 

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

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

Submitter:  vac <vac>
Submitted:  Mon 18 Aug 2014 02:37:38 PM UTC
   
 
Category:  Header Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Header files
Status:  Fixed Assigned to:  pitchumani
Percent Complete:  0% Open/Closed:  Closed
Release:  Any Fixed Release:  None

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

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

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-06-19 pitchumani StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2015-06-19 pitchumani StatusNone In Progress
        Assigned toNone pitchumani

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code