Using I2C/SPI Tap |
Top Previous Next |
Connecting I2C and SPI signals to the Tap To monitor I2C traffic, connect your I2C bus to terminals D0 (SCL) and D1 (SDA) terminals. To monitor SPI traffic, connect your SPI bus to terminals D0 (SCLK), D1 (MOSI), D2 (MISO), and D3 (SS). Note that the Tap has a built-in generator of test signals.
Selecting the logic voltage levels I2C/SPI Tap can work with logic voltage levels from 1.8V to 5V. For correct operation of the Tap, you must select correct reference voltage for the Tap's level shifters. This is done using the IO VOLTAGE SELECT jumper. Two reference voltages — 3.3V and 5V — are provided by the Tap itself. Other logic levels require an external reference voltage applied to the VIO terminal. To select the VIO input, put the jumper into the VIO position and connect the VIO terminal to the external voltage source (typically, the VCC line of the device you are monitoring). For example, if you are tapping into the I2C bus of a 1.8V device, then connect the VIO terminal to the 1.8V power used by this device.
No SDA pull-up resistor on the Tap The SDA line of I2C interface requires a pull-up resistor. This Tap does not contain such a resistor and expects that the monitored device will have it.
Setting up IO Ninja •Install and run IO Ninja (http://ioninja.com/). •Plug the Serial Tap into the USB port of your PC. •Launch the I2C/SPI Tap plugin. •Click on the Tap drop-down and select the target I2C/SPI Tap. Note: you can connect several I2C/SPI Taps to one PC. If necessary, refresh the list of available Taps. •Select the I2C or SPI protocol in the Protocol dropdown. •In the case of SPI protocol, set the SPI mode, word length (SPI data bits), and endianness in the Settings dialog. •Click the Capture button to start the data acquisition. At this moment, IO Ninja will check the Tap's configuration. If the Tap is configured for a different protocol (for example, for SPI while you need I2C), IO Ninja will reconfigure the Tap. This will only take a couple of seconds. Note that the Tap has two green LEDs M0 and M1. These LEDs indicate the Tap's configuration: oIn the I2C mode, M0 is ON, and M1 is OFF; oIn the SPI mode, M0 is OFF, and M1 is ON. •When monitoring SPI traffic, you can also flip (swap) MISO and MOSI lines' data. From the Tap's point of view, MOSI and MISO are abstract labels. This is because the Tap is neither SPI slave nor SPI master. The tap is a passive observer, and so it is up to you to decide which of the two SPI data lines is MISO, and which is MOSI. Rather than physically swapping the wires connected to the Tap's terminal block, you can achieve the same result by clicking Flip SPI MISO/MOSI.
The above is illustrated by screenshots in I2C Mode Screenshot and SPI Mode Screenshots. The screenshot depicting IO Ninja in I2C mode also contains important comments on Ninja's representation of I2C traffic, specifically, how unacknowledged (unACKed) bytes are shown.
|