[En-Nut-Discussion] TWI at AT91SAM9260 and Nut/OS Driver

af_80 a_funk80 at yahoo.de
Wed Jun 25 11:36:46 CEST 2008

Ole Reinhardt-2 wrote:
> Hi!
> @af_80: If you could send me more information at which situation the
> driver stops working this would help me much debugging the system. And
> don't forget to initialise the driver.
> Regards,
> Ole Reinhardt

Hello Ole,

I have copied the source of at91_twi.c and the header file to the root of my
project and included these in the makefile. After that i commented out
following lines:

//#if defined (MCU_AT91SAM7X256) 


#define TWI_TWD  PA23_TWD_A     // modified for at91sam9260
#define TWI_TWCK PA24_TWCK_A  // modified for at91sam9260


Now by using of the TWInit() i get some compiler errors:

**** Build of configuration Default for project x-b_icard ****

make all 
arm-elf-gcc -c -mcpu=arm9 -Os -mthumb-interwork -fomit-frame-pointer -Wall
-Wstrict-prototypes -fverbose-asm -Wa,-ahlms=main.lst -DAT91SAM9260_EK
-IC:/ethernut-4.4.1/nut/include  main.c -o main.o
main.c: In function 'TWI_read_EEPROM':
main.c:26: warning: implicit declaration of function 'TwInit'
main.c:27: warning: implicit declaration of function 'TwMasterTransact'
arm-elf-gcc -c -mcpu=arm9 -Os -mthumb-interwork -fomit-frame-pointer -Wall
-Wstrict-prototypes -fverbose-asm -Wa,-ahlms=at91_twi.lst -DAT91SAM9260_EK
-IC:/ethernut-4.4.1/nut/include  at91_twi.c -o at91_twi.o
at91_twi.c: In function 'TwMasterTransact':
at91_twi.c:179: error: 'sig_TWI' undeclared (first use in this function)
at91_twi.c:179: error: (Each undeclared identifier is reported only once
at91_twi.c:179: error: for each function it appears in.)
at91_twi.c: In function 'TwInit':
at91_twi.c:346: error: 'sig_TWI' undeclared (first use in this function)
make: *** [at91_twi.o] Error 1

Is they are some known Tutorials, how to use bintbanging twi on an

View this message in context: http://www.nabble.com/TWI-at-AT91SAM9260-and-Nut-OS-Driver-tp18086632p18108414.html
Sent from the MicroControllers - Ethernut mailing list archive at Nabble.com.

More information about the En-Nut-Discussion mailing list