xmega32D4 TWIE definitions missing in iox32d4.h

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

Forgive a simpleton hardware engineer for such questions but....

Is there some reason TWIE module definitions are missing from the header file?

I've copied the ones from the 128A1 file over as they seem to be about right.

...and I realise this is probably a dumb question but how do the interrupt vectors tie up with the definitions. How does TWIE_INT_base become vector 45 when the datasheet of the device indicates the address is 0x05A.

Thanks for help in advance!

Ax

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The GCC header files start life in the XML files from Atmel. Guess what:

E:\Program Files\Atmel\AVR Tools\Partdescriptionfiles[i386_vc]>grep TWIE ATxmega*.xml
ATxmega128A1.xml:                       
ATxmega128A1.xml:                       
ATxmega128A1.xml:                               
ATxmega128A1U.xml:                      
ATxmega128A1U.xml:                      
ATxmega128A1U.xml:                              
ATxmega128A3.xml:                       
ATxmega128A3.xml:                       
ATxmega128A3.xml:                               
ATxmega16A4.xml:                        
ATxmega16A4.xml:                        
ATxmega16A4.xml:                                
ATxmega192A3.xml:                       
ATxmega192A3.xml:                       
ATxmega192A3.xml:                               
ATxmega256A3.xml:                       
ATxmega256A3.xml:                       
ATxmega256A3.xml:                               
ATxmega256A3B.xml:                      
ATxmega256A3B.xml:                      
ATxmega256A3B.xml:                              
ATxmega32A4.xml:                        
ATxmega32A4.xml:                        
ATxmega32A4.xml:                                
ATxmega64A1.xml:                        
ATxmega64A1.xml:                        
ATxmega64A1.xml:                                
ATxmega64A3.xml:                        
ATxmega64A3.xml:                        
ATxmega64A3.xml:                                

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, but I don't catch your drift?

I don't see the ATxmega32D4 anywhere either?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Exactly - Atmel did not define TWIE for 32D4 in their XML files and this is why the .h files that are derived from them don't have it either. IOW the error is on Atmel's part for having missed this. There is an XML for the 32D4:

E:\Program Files\Atmel\AVR Tools\Partdescriptionfiles[i386_vc]>dir ATxmega*.xml
 Volume in drive E is VBOX_linux
 Volume Serial Number is 0000-0805

 Directory of E:\Program Files\Atmel\AVR Tools\Partdescriptionfiles

20/08/2010  13:42           184,425 ATxmega128A1.xml
25/02/2010  11:09           209,560 ATxmega128A1U.xml
20/08/2010  13:42           182,744 ATxmega128A3.xml
20/08/2010  13:42           150,388 ATxmega128D3.xml
20/08/2010  13:42           179,210 ATxmega16A4.xml
20/08/2010  13:42           149,249 ATxmega16D4.xml
20/08/2010  13:42           182,748 ATxmega192A3.xml
20/08/2010  13:42           150,387 ATxmega192D3.xml
20/08/2010  13:42           182,745 ATxmega256A3.xml
20/08/2010  13:42           183,213 ATxmega256A3B.xml
20/08/2010  13:42           150,281 ATxmega256D3.xml
20/08/2010  13:42           179,211 ATxmega32A4.xml
20/08/2010  13:42           149,442 ATxmega32D4.xml
20/08/2010  13:42           184,416 ATxmega64A1.xml
20/08/2010  13:42           182,734 ATxmega64A3.xml
20/08/2010  13:43           150,740 ATxmega64D3.xml

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

From the errata section for rev A and B in the XMEGA D4 datasheet ( http://www.atmel.com/dyn/resourc... ):

Quote:

27. TWIE is not available
The TWI module on PORTE, TWIE is not available
Problem fix/Workaround
Use the identical TWI module on PORTC, TWIC instead

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is seriously upsetting.

Looking at the errata list how did this chip ever get released? Did anyone at Atmel bother to turn one on and test it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, panic over, I can fit the A4 instead.