Thu 10 Feb 2011 08:25:36 PM UTC, original submission:
The header file "iox192a3.h" for ATxmega192A3 contains the wrong EEPROM size for that processor (checked version 1.7.0 and also latest header in SVN repository). This file contains the following lines indicating a 4 KB EEPROM:
#define EEPROM_SIZE (4096)
#define MAPPED_EEPROM_SIZE (4096)
The datasheet for this part at http://www.atmel.com/dyn/resources/prod_documents/doc8068.pdf clearly states in section 1 "Ordering Information" that ATxmega192A3-MH and ATxmega192A3-AU have only 2 KB EEPROM - not 4 KB.
This is problematic for applications that compile for multiple XMEGA variants that need to use this constant value for determining the size of the EEPROM (note that EEPROM_SIZE is used for other definitions, like E2END). On this particular device, they will try to access regions of EEPROM that do not actually exist.
If the header file is generated from the part description XML file in AVR Studio, then that would be the original source of the bug. The part description file in AVR Studio also has the incorrect 4 KB EEPROM declared.
I contacted Atmel regarding the problem in the part description file and received the following response:
"Dear customer,
The correct size is 2KB EEPROM as stated in the datasheet.
I am sorry for the confusion.
Best Regards,
Andreas Loehre
Atmel Technical Support Team"
Either the datasheet is wrong or the part description & header file is wrong. Atmel says the datasheet is correct, so then it seems it's a bug in the header file and AVR Studio's part description file.
|