Comparing JTAG, SPI, and I2C

Similar documents
Testing Sequential Logic. CPE/EE 428/528 VLSI Design II Intro to Testing (Part 2) Testing Sequential Logic (cont d) Testing Sequential Logic (cont d)

Using the XC9500/XL/XV JTAG Boundary Scan Interface

Product Update. JTAG Issues and the Use of RT54SX Devices

12. IEEE (JTAG) Boundary-Scan Testing for the Cyclone III Device Family

Remote Diagnostics and Upgrades

Overview of BDM nc. The IEEE JTAG specification is also recommended reading for those unfamiliar with JTAG. 1.2 Overview of BDM Before the intr

SignalTap Plus System Analyzer

XJTAG DFT Assistant for

7 Nov 2017 Testing and programming PCBA s

Ilmenau, 9 Dec 2016 Testing and programming PCBA s. 1 JTAG Technologies

16 Dec Testing and Programming PCBA s. 1 JTAG Technologies

Chapter 19 IEEE Test Access Port (JTAG)

SAU510-USB ISO PLUS v.2 JTAG Emulator. User s Guide 2013.

TMS320C6000: Board Design for JTAG

NS8050U MICROWIRE PLUSTM Interface

Debugging IDT S-RIO Gen2 Switches Using RapidFET JTAG

XJTAG DFT Assistant for

Section 24. Programming and Diagnostics

University of Arizona January 18, 2000 Joel Steinberg Rev. 1.6

The following document contains information on Cypress products.

Tools to Debug Dead Boards

18 Nov 2015 Testing and Programming PCBA s. 1 JTAG Technologies

XJTAG DFT Assistant for

MSP430-HG2231 development board Users Manual

Section 24. Programming and Diagnostics

SiI9244 MHL Transmitter with HDMI Input

Configuring FLASHlogic Devices

A Briefing on IEEE Standard Test Access Port And Boundary-Scan Architecture ( AKA JTAG )

3. Configuration and Testing

APPLICABILITY TABLE. SW Versions. GE Family ( Embedded ) GE910-QUAD V xx5 GE910-GNSS

Universal ByteBlaster

XJTAG DFT Assistant for

JTAG Test Controller

Memec Spartan-II LC User s Guide

the Boundary Scan perspective

of Boundary Scan techniques.

BABAR IFR TDC Board (ITB): system design

BUSES IN COMPUTER ARCHITECTURE

Document Part Number: Copyright 2010, Corelis Inc.

@DonAndrewBailey

JRC ( JTAG Route Controller ) Data Sheet

Entry Level Tool II. Reference Manual. System Level Solutions, Inc. (USA) Murphy Avenue San Martin, CA (408) Version : 1.0.

MSP430-H2618 development board Users Manual

M24SR-DISCOVERY. Discovery kit for the M24SR series Dynamic NFC/RFID tag. Features

Using the XSV Board Xchecker Interface

BTW03 DESIGN CONSIDERATIONS IN USING AS A BACKPLANE TEST BUS International Test Conference. Pete Collins

GM60028H. DisplayPort transmitter. Features. Applications

JTAGcable II In Circuit Emulator for Atmel AVR microcontrollers. User s Guide REV 1.0. Many ideas one solution

This document describes a program for 7-segment LED display (dynamic lighting) and key matrix and input.

Low-speed serial buses are used in wide variety of electronics products. Various low-speed buses exist in different

Lecture 17: Introduction to Design For Testability (DFT) & Manufacturing Test

GM68020H. DisplayPort receiver. Features. Applications

GM69010H DisplayPort, HDMI, and component input receiver Features Applications

Unit V Design for Testability

Multi-channel LED driver with integrated boost controller for medium, large LCD panel backlight based on LED7708 and STM32F103C6T6A

UNIT IV CMOS TESTING. EC2354_Unit IV 1

Raspberry Pi debugging with JTAG

CoLinkEx JTAG/SWD adapter USER MANUAL

RF4432 wireless transceiver module

STEVAL-ICB004V1. Advanced resistive touchscreen controller demonstration board based on the STMPE811. Features. Description

L7208. Portable consumer electronics spindle and VCM motor controller. General features. Spindle driver. Description. VCM driver.

11. JTAG Boundary-Scan Testing in Stratix V Devices

Saving time & money with JTAG

This document describes a program for 7-segment LED display (dynamic lighting).

QUADRO AND NVS DISPLAY RESOLUTION SUPPORT

Based on slides/material by. Topic 14. Testing. Testing. Logic Verification. Recommended Reading:

Maintenance/ Discontinued

CMOS Testing-2. Design for testability (DFT) Design and Test Flow: Old View Test was merely an afterthought. Specification. Design errors.

Test Report TIDA /14/2014. Test Report For TIDA Aptina Automotive Camera Module 02/14/2014

AT18F Series Configurators. Application Note. Stand-alone or In-System Programming Applications for AT18F Series Configurators. 1.

Serial Peripheral Interface

Introduction to JTAG / boundary scan-based testing for 3D integrated systems. (C) GOEPEL Electronics -

HCS08 SG Family Background Debug Mode Entry

ASTRIX ASIC Microelectronics Presentation Days

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Digital Integrated Circuits Lecture 19: Design for Testability

QUADRO AND NVS DISPLAY RESOLUTION SUPPORT

DA8-T DA8-T MANUAL

Instant 802.3af Gigabit Outdoor PoE Converter. Model: INS-3AF-O-G. Quick Start Guide

PicoBlaze. for Spartan-3, Virtex-II, Virtex-IIPRO and Virtex-4 devices. JTAG Loader. Quick User Guide. Kris Chaplin and Ken Chapman

Debugging a Mixed Signal Design with a Tektronix Mixed Signal Oscilloscope

Is Now Part of To learn more about ON Semiconductor, please visit our website at

Macronix OctaFlash Serial NOR Flash White Paper

ATA8520D Production and EOL Testing. Features. Description ATAN0136 APPLICATION NOTE

SECTION 686 VIDEO DECODER DESCRIPTION

PRO-HDMI2HD. HDMI to SDI/3G-HD-SD Converter. User Manual. Made in Taiwan

XDS510USB PLUS JTAG Emulator Technical Reference

In-System Programmability Guidelines

Device 1 Device 2 Device 3 Device 4

3-Channel 8-Bit D/A Converter

Maintenance/ Discontinued

M89 FAMILY In-System Programmable (ISP) Multiple-Memory and Logic FLASH+PSD Systems for MCUs

AN-822 APPLICATION NOTE

RF4432F27 wireless transceiver module

Using the KCU105 Kintex Ultrascale evaluation kit

MSP430 JTAG / BSL connectors

Multi-Media Card (MMC) DLL Tuning

Memory Interfaces Data Capture Using Direct Clocking Technique Author: Maria George

C-MAX. CMM-9301-V3.1S Bluetooth 4.0 Single Mode HCI Module. Description. 1.1 Features

Is Now Part of To learn more about ON Semiconductor, please visit our website at

Transcription:

Comparing JTAG, SPI, and I2C Application by Russell Hanabusa 1. Introduction This paper discusses three popular serial buses: JTAG, SPI, and I2C. A typical electronic product today will have one or more serial buses in them. Using a serial bus in a system has many advantages over a parallel bus. 1. Lower component cost 2. Smaller printed circuit board 3. Simplified design 4. Typically, lower power consumption The trade-off for these advantages is inherently lower data transfer rates than a parallel bus system. In serial buses only one wire carries data into and/or out of the device. In some cases there is one signal for carrying data into the device another different signal for carrying data out of the device. On the other hand in parallel buses many signals transfer data simultaneously into and out of the device. The following table provides a quick overview comparing these serial buses: Table 1.1 Overview of SPI, I2C, and JTAG Serial Buses Name Architecture Feature Multi- Master Data Rate SPI (Serial) I2C (Inter IC) JTAG (Joint Test Action Group) 2 shared uni-directional data signals and a shared clock Shared data signal, and a shared clock signal Daisy Chain data signal Bi-directional communication on share bus Bi-directional communication on shared bus Can verify device connectivity, in-circuit emulation, device configuration, and internal device functional testing These three serial buses are described in the following sections. Possible, but not standard Yes No Flyby Data Transfer Full Duplex 1 Mbps No Yes 100 kbps, 400 kbps, 3.2 Mbps 10-100 MHz Yes N/A No N/A 2. SPI SPI is an acronym for Serial Peripheral Interface bus. SPI allows for full-duplex data transfers. Typically, there is only one bus master, all other SPI devices are slaves. Some vendors (example: Xilinx ) provide a means for SPI bus arbitration, but this is not a requirement of the SPI standard. SPI has a shared data bus. The master transmits data on the SO signal line and receives data on the SI signal line, this allows the bus master to simultaneously transmit and receive data. All data transfers must take place between the Bus Master and slaves. Data transfers directly between two slave devices (Flyby transfers) are not allowed. The SPI Bus Master signals are shown below. SCK SPI Bus Clock output by SPI Bus Master SI Input Data to Bus Master SO Output Data from Bus Master Publication Number comparing_serial_interfaces_an Revision 01 Issue Date April 13, 2007

Figure 2.1 shows an example of an SPI system with one bus master and three slave devices. The SPI Bus Master outputs an individual device select signal for each SPI device slave. Figure 2.1 Typical SPI Bus System SO SI SCK SPI Bus Master SCK SO SI DEVICE 1 CS# W# HOLD# SCK SO SI DEVICE 2 CS# W# HOLD# SCK SO SI DEVICE 3 CS# W# HOLD# CS1# CS2# CS3# Figure 2.2 is an example of an SPI read bus cycle of a Spansion SPI Flash. For Spansion SPI devices, data is sampled on the rising edge of SCK and changes on the falling edge of SCK. Figure 2.2 SPI Bus Cycle CS# SCK Mode 3 Mode 0 0 1 2 3 4 5 6 7 8 9 10 28 29 30 31 32 33 34 35 36 37 38 39 Command 24-Bit Address SI 23 22 21 3 2 1 0 SO Hi-Z Data Out 1 Data Out 2 7 6 5 4 3 2 1 0 7 The bus cycle events are as follows: 1. CS# is asserted low to select the Flash. 2. The SPI read command is send. 3. The internal 24-bit Flash memory address is send. 4. The first Flash data byte is read out. In Figure 2.2 at the left of the SCK signal are shown the options of Mode 0 and Mode 3. Depending on the system SCK should be high (Mode3) when idle. In other systems SCK it should be low (Mode0) when idle. In both mode 0 and 3 data is clocked in on the rising edge of clock and out on the falling edge of clock. The SPI bus is a loose standard. Some devices can have a reversed SCK polarity. that some SPI devices can be connected in a daisy chain manner, but again this is not a requirement of the SPI standard. It is possible to daisy chain SPI devices with the data output of the first SPI device going into the data input of the 2nd SPI and so on. This paper does not discuss this. that, like with JTAG, none of the daisy chained devices would have independent access to the bus master. 2 Comparing JTAG, SPI, and I2C comparing_serial_interfaces_an_01 April 13, 2007

3. I2C I2C is an acronym for Inter IC bus. I2C allows for multiple bus masters and flyby data transfers. Standard I2C can support data transfer up to 100 kbs. There is also fast I2C at 400 kbs and high speed I2C at 3.4 Mbps. The I2C Bus Master signals are shown below: SCL SPI Bus Clock. Data I2C bus has only two signals: SCL and. They are both bi-directional and open collector. Pull-up resistors on SCL and are required. SCL is used for clock and wait. is used for address and data since there is only one data line full-duplex cannot be supported. Figure 3.1 shows an example I2C system is shown below with two Master/Slave devices and two Slave only devices. The I2C bus does not have device select signals, but selects an I2C device by sending a device select byte. Therefore, all I2C devices must be preprogrammed with a unique I2C bus address before they are used on the I2C bus. The I2C protocol supports up to 127 addressable devices. Figure 3.1 Typical I2C Bus System Pull Up Resistors SCL SCL Master/ Slave #1 SCL Master/ Slave #2 SCL SCL Slave #3 Slave #4 3.1 I2C Bus Cycle The I2C clock signal (SCK) is generated by the current master, but all the slaves can hold the SCK signal low until they are ready to allow it to go high. In this way a rising SCK is delayed until the slowest I2C device is ready. Figure 3.2 shows the transfer of a byte to a slave, the slave acknowledges the transfer, and then holds down SCL until it is ready for the next byte. Figure 3.2 I2C Bus Cycle START LSB Acknowledgement signals from receiver SCL 1 2 6 7 8 9 1 SCL held low by slave to hold off the next data until it is ready. Bus arbitration is done with the line. All of the potential bus masters simultaneously try to drive the signal. When any bus master detects that they have driven a '1', but detected a '0' on the signal it has lost the bus arbitration. It will immediately give up driving the signal and will go into slave mode incase it was the addressed slave device. April 13, 2007 comparing_serial_interfaces_an_01 Comparing JTAG, SPI, and I2C 3

4. JTAG The Joint Test Action Group (JTAG) method of connection is the IEEE standard #1149. It is also known as JTAG boundary scan. JTAG is commonly used for the following applications: 1. Board Assembly Test (verifies the connectivity of device pins to the PCB) 2. Development Tool (in-circuit emulator) 3. System Debug (provides a back door into the system) 4. Testing internal device circuitry (not be discussed here) Typically, JTAG is a feature found in relatively high pin count devices, but not in low pin count devices. I2C and SPI can be found in both high pin count devices like microcontrollers and in low pin count devices like A/D converters. JTAG uses four (plus an optional reset signal) wires to pass data through devices in a daisy chain. These signals are shown below: 1. TDI (Test Data In) - Daisy Chained 2. TDO (Test Data Out) - Daisy Chained 3. TCK (Test Clock) - Shared 4. TMS (Test Mode Select) - Shared 5. TRST (Test ReSeT) optional Figure 4.1 shows an example of a JTAG circuit is shown in the following figure. There is a JTAG Controller Connection and three JTAG devices. Figure 4.1 JTAG Bus System TMS TCK JTAG Controller TCK TMS Connector Device #1 TDI TD0 TDI TDO TCK TMS Device #2 TDI TDO TCK TMS Device #3 TDI TDO A JTAG Controller is connected at the connector and it drives TCK and TDI into DEVICE #1. The TDI data eventually passed out of the DEVICE #1 TDO pin into DEVICE #2 and so on until the daisy chain is closed back at the JTAG Controller at TDO. The buses signals TMS and TCK control the data transfer. 4 Comparing JTAG, SPI, and I2C comparing_serial_interfaces_an_01 April 13, 2007

4.1 JTAG Bus Cycle Data outputs change on the falling edge of TCK and data is sampled on rising edge of TCK. TMS and TRST are not shown. Data transfers with JTAG are takes more clocks than the other serial buses, because in JTAG the data must pass sequentially through the devices in the chain. See Figure 4.2. Figure 4.2 JTAG Bus Cycle TCK TDI/TDO 0 1 0 0 1 1 0 1 LSB 5. Summary Using serial buses instead of parallel buses can cut component costs, space, and power consumption. Lower system performance is typical, but could be acceptable in many applications. Complete systems can be built using either SPI or I2C. JTAG is typically used only during product development, manufacturing, or servicing. April 13, 2007 comparing_serial_interfaces_an_01 Comparing JTAG, SPI, and I2C 5

6. Revision History Section Revision 01 (April 13, 2007) Initial release Description 6 Comparing JTAG, SPI, and I2C comparing_serial_interfaces_an_01 April 13, 2007

Colophon The products described in this document are designed, developed and manufactured as contemplated for general use, including without limitation, ordinary industrial use, general office use, personal use, and household use, but are not designed, developed and manufactured as contemplated (1) for any use that includes fatal risks or dangers that, unless extremely high safety is secured, could have a serious effect to the public, and could lead directly to death, personal injury, severe physical damage or other loss (i.e., nuclear reaction control in nuclear facility, aircraft flight control, air traffic control, mass transport control, medical life support system, missile launch control in weapon system), or (2) for any use where chance of failure is intolerable (i.e., submersible repeater and artificial satellite). Please note that Spansion will not be liable to you and/or any third party for any claims or damages arising in connection with above-mentioned uses of the products. Any semiconductor devices have an inherent chance of failure. You must protect against injury, damage or loss from such failures by incorporating safety design measures into your facility and equipment such as redundancy, fire protection, and prevention of over-current levels and other abnormal operating conditions. If any products described in this document represent goods or technologies subject to certain restrictions on export under the Foreign Exchange and Foreign Trade Law of Japan, the US Export Administration Regulations or the applicable laws of any other country, the prior authorization by the respective government entity will be required for export of those products. Trademarks and Notice The contents of this document are subject to change without notice. This document may contain information on a Spansion product under development by Spansion. Spansion reserves the right to change or discontinue work on any product without notice. The information in this document is provided as is without warranty or guarantee of any kind as to its accuracy, completeness, operability, fitness for particular purpose, merchantability, non-infringement of third-party rights, or any other warranty, express, implied, or statutory. Spansion assumes no liability for any damages of any kind arising out of the use of the information in this document. Copyright 2007 Spansion Inc. All rights reserved. Spansion, the Spansion Logo, MirrorBit, MirrorBit Eclipse, ORNAND, HD-SIM and combinations thereof, are trademarks of Spansion LLC in the US and other countries. Other names used are for informational purposes only and may be trademarks of their respective owners. April 13, 2007 comparing_serial_interfaces_an_01 Comparing JTAG, SPI, and I2C 7