AVR32 UC3 - TWI Driver - Slave Mode Documentation
This is the documentation for the data structures, functions, variables, defines, enums, and typedefs for the TWI driver slave mode example.
The given example uses one evaluation kit for TWI master (EVK1100, EVK1101 or STK1000 to program with MASTER_EXAMPLE) and another one for TWI slave (EVK1100 or EVK1101).
The TWI slave initializes the TWI as slave and registers its receive and transmit callbacks. It displays on USART1 a status message upon initialization.
- Connect a UART monitor on the UART_1 of the board with TWI master
- Connect the TWI master with TWI slave (VCC=VCC,SDA=SDA,SCL=SCL,GND=GND)
- Compile a master and a slave firmware with same configuration (addr mode,speed)
- Program the master and slave boards
- RESET Slave board (=reset TWI memory)
- Release RESET on MASTER board
- on UART, you see all tests PASS
- Release RESET on MASTER board
- on UART, you see always all tests PASS.
This software is written for GNU GCC for AVR32 and for IAR Embedded Workbench for Atmel AVR32. Other compilers may or may not work.
You can change the following defines but you should make sure that there are the same on the TWI master side for the tests to pass:
All AVR32 devices with a TWI module can be used.
This example has been tested with the following configuration:
- EVK1100 or EVK1101 evaluation kit;
- CPU clock: 12 MHz;
- USART1 connected to a PC serial port via a standard RS232 DB9 cable;
- PC terminal settings:
- 57600 bps,
- 8 data bits,
- no parity bit,
- 1 stop bit,
- no flow control.
For further information, visit
Atmel AVR32.
Support and FAQ:
http://support.atmel.no/