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.