This driver has been released under the Eclipse Public License version 2.0! It can be found on GitHub.
The ASH WARE I2C eTPU Driver allows the Freescale eTPU to be connected to an I2C bus running in Standard-mode or Fast-mode, as either a master or slave node. By using the output pin pad open drain capability, no external hardware is required for this connection other than a pullup. This driver has been written to support both the eTPU and eTPU2 devices, and can run on any Freescale or STMicro chip with the eTPU/eTPU2 peripheral.
2.00 - modernize the host API and structure and move to GitHub
1.11 - fix minor scripting issues
1.10 - modified to run under DevTool (the new IDE)
1.00 - initial version
The I2C master driver supports the following features.
Arbitration (multi-master), high-speed mode, CBUS and 10-bit addressing are not currently supported. The I2C master solution uses 4 consecutive eTPU channels and their associated pins. The first two must be connected to the SCL wire, the second two to the SDA wire. They function as follows:
base channel: SCL_out
base channel+1: SCL_in
base channel+2: SDA_out
base channel+3: SDA_in
The I2C slave driver supports the following features.
The I2C slave solution uses 4 consecutive eTPU channels and their associated pins. The first two must be connected to the SCL wire, the second two to the SDA wire. They function as follows:
base channel: SCL_in
base channel+1: SCL_out
base channel+2: SDA_in
base channel+3: SDA_out
The following waveforms show the SCL and SDA wires during a write and read transfer. Both a master and slave have been instantiated on a single eTPU, and connected together. Signal levels for all the master channels (write transfer), and all the slave channels (read transfer) are shown as well.
Testing includes 100 % code and jump coverage of the eTPU software. All features described in the User Manual have been tested.