Introduction
This is the documentation for the data structures, functions, variables, defines, enums, and typedefs for the TWI driver single-master mode example.
The given example uses one evaluation kit for TWI master (EVK1100, EVK1101 or STK1000) and another one for TWI slave (EVK1100 or EVK1101 to program with SLAVE_EXAMPLE).
The TWI master performs a few basic checks and prints the results (PASS/FAIL) on USART1. The checks are:
- the TWI master probes the TWI slave,
- the TWI master performs a write access to the TWI slave,
- the TWI master performs a read access of what it just wrote to the TWI slave,
- the read data are compared with the originally written data.
Validation Procedure
- 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.
Main Files
Compilation Info
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 slave side for the tests to pass:
Device Info
All AVR32 devices with a TWI module can be used.
Configuration Information
This example has been tested with the following configuration:
- EVK1100 or EVK1101 evaluation kit, or STK1000 starter 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.
Contact Information
For further information, visit Atmel AVR32.