Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: question about the TWI interface of the SAM7S256
PostPosted: Wed Aug 11, 2010 1:49 pm 
Offline

Joined: Sun Jan 03, 2010 5:18 pm
Posts: 22
Hello, i have a short an perhaps simple answered question.

I use the GNU headers for the SAM7S256.

I have the datasheet for the SAM7S256 and i noticed that in the header more bits are defined then can be found in the datasheet for the TWI status register TWI_SR.
The lower text are not defined in the datasheet. It can however be that i have an old datasheet.

Code:
#define AT91C_TWI_TXCOMP      (0x1 <<  0) // (TWI) Transmission Completed
#define AT91C_TWI_RXRDY       (0x1 <<  1) // (TWI) Receive holding register ReaDY
#define AT91C_TWI_TXRDY       (0x1 <<  2) // (TWI) Transmit holding register ReaDY
#define AT91C_TWI_NACK        (0x1 <<  8) // (TWI) Not Acknowledged




#define AT91C_TWI_OVRE        (0x1 <<  6) // (TWI) Overrun Error
#define AT91C_TWI_UNRE        (0x1 <<  7) // (TWI) Underrun Error
#define AT91C_TWI_ENDRX       (0x1 << 12) // (TWI)
#define AT91C_TWI_ENDTX       (0x1 << 13) // (TWI)
#define AT91C_TWI_RXBUFF      (0x1 << 14) // (TWI)
#define AT91C_TWI_TXBUFE      (0x1 << 15) // (TWI)


But i find it interesting that BIT3 = 2^3 = value 8 , is set after transfer of data and not mentioned in the datasheet or the header.

I use a simple function in my program to read out the registers directly and dump the data to the debug port for comparison and study.

I assume i have outdated headers, but i have looked and downloaded everything i could find but did not find newer versions of the header file SAM7S256.h.

Am i overlooking something ?
If this is the case, where do i need to look ?

I can operate the TWI interface, i was just curious about the anomalies i found.

Thank you in advance for your answer.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: