AVR C Runtime Library - Bugs: bug #47937, Incorrect "0" suffix in...
You are not allowed to post comments on this tracker with your current authentication level.
bug #47937: Incorrect "0" suffix in names of SPI registers and bits for ATmega324PA and ATmega164PA
Submitter: | David Grayson <davidegrayson> | ||
Submitted: | Mon 16 May 2016 09:59:03 PM UTC | ||
Category: | Header | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | Header files |
Status: | Confirmed | Assigned to: | None |
Percent Complete: | 0% | Open/Closed: | Open |
Release: | 2.0.0 | Fixed Release: | None |
Jump to the original submission
Mon 28 Aug 2017 08:22:07 PM UTC, comment #7: |
David Grayson <davidegrayson> |
Mon 10 Oct 2016 10:12:58 PM UTC, comment #6: Hey, it looks like my patch has not been applied to avr-libc. This is just a reminder to do that. |
David Grayson <davidegrayson> |
Mon 23 May 2016 09:30:48 PM UTC, comment #5: An Atmel tech support representative has told me that he will file a bug report, but did not give any other useful information. |
David Grayson <davidegrayson> |
Wed 18 May 2016 06:31:59 AM UTC, comment #4: OK, great if your patch maintains both names. I'll apply
|
Joerg Wunsch <joerg_wunsch> |
Wed 18 May 2016 02:05:00 AM UTC, comment #3: While I was researching my bug report to Atmel, I noticed a new part definition file in Atmel Studio 7.0.934: the ATmega324PB. This part will have two SPI modules, so it makes sense that all of its SPI registers and bits are suffixed with 0 and 1. I suspect that Atmel is purposely renaming the SPI registers on the old parts for consistency's sake. They renamed the SPI registers for the ATmega164{A,P,PA} and ATmega324{A,P,PA}, but they have not yet done it for the ATmega644* or ATmega1284*.
|
David Grayson <davidegrayson> |
Wed 18 May 2016 01:37:13 AM UTC, comment #2: Hello, Joerg. I have seen your name a lot over the years during my AVR-related work, so it is nice to hear from you.
|
David Grayson <davidegrayson> |
Tue 17 May 2016 06:35:16 AM UTC, comment #1: Actuall, the datasheet is inconsistent on this: in the register
|
Joerg Wunsch <joerg_wunsch> |
Mon 16 May 2016 09:59:03 PM UTC, original submission:
The attached patch fixes the names that avr-libc defines for several SPI-related registers in iom324pa.h and iom164pa.h. The datasheets call the registers SPCR, SPSR, and SPDR, but avr-libcs's definitions had "0" at the end of the name: SPCR0, SPSR0, and SPDR0. The names of bits defined in these registers were wrong in the same way. This patch adds new definitions with the correct names, while leaving the old definitions around for backwards compatibility.
|
David Grayson <davidegrayson> |
Depends on the following items: None found
Items that depend on this one: None found
Follow 2 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-05-18 | joerg_wunsch | Status | None | Confirmed | |
2016-05-16 | davidegrayson | Attached File | - | Added spi_fix_m164pa_m324pa.patch, #37181 |
Powered by Savane 3.13-3230.
Corresponding source code
Atmel has updated the ATmega324PA datasheet. It now uses names like "SPCR0" in the tables that define the registers, but they still have plenty of example code and wording in paragraphs that refer to "SPCR".
The ATmega164PA datasheet still does not use the name "SPCR0", so users of that chip will have trouble due to the missing register names in avr-libc.
I submitted this patch 15 months ago and I thought it would be pretty straightforward. Are there any issues with it?