Home » Corelis Boundary-Scan Blog » JTAG Boundary-Scan » SPI Flash Component Programming

SPI Flash Component Programming

Introduction
In light of the discussion in our last installment about the relationship between JTAG and SPI, it’s no surprise that there is overlap with JTAG and SPI tools. Newer Corelis JTAG controllers include capabilities for direct communication with SPI buses, with the main goal of speeding up Flash programming. Let’s take a look at how SPI Flash devices may be programmed using Corelis tools.

Boundary-scan Programming
Boundary-scan programming is popular with Flash devices for its convenience. The JTAG controller communicates with a boundary-scan device that has a Flash interface—in this case a SPI bus. The boundary-scan device, now under the control of the JTAG controller, then controls the SPI lines using boundary-scan IO pins to create SPI transactions. While convenient, this method tends to be slow.


Figure 1: Boundary-scan Programming configuration with 3 slaves

Advantages

  • No direct access to the SPI Flash required. Many designs will not have connector or test point access to the SPI bus, making this method impossible.

Disadvantages

  • Slow speed. The SPI signals are unlikely to be the only signals in the boundary-scan device chain—a high pin count device may have more than a thousand cells! Shifting through a large chain just to control 4 pins will significantly reduce the effective SPI clock rate.

Direct Programming
Direct programming uses a direct interface between the hardware controller and SPI bus to program SPI Flash without the overhead of boundary-scan. All modern Corelis JTAG controllers, such as the single-TAP USB-1149.1/1E or the 4-TAP NetUSB-1149.1/E (blue LED version) include this feature.


Figure 2: Direct Programming configuration with 3 independent slaves

Advantages

  • High speed. Direct programming does not have any scan overhead and can run as fast as the JTAG controller and SPI slave are capable of going.

Disadvantages

  • Requires direct access to SPI lines. In order to be able to program SPI Flash directly, the controller needs to be capable of directly tapping in to those SPI lines.
  • Requires Controller Support. The JTAG controller must include SPI programming capabilities.

Conclusion
If you have a supported controller and a need for speed, direct SPI programming can save time. Boundary-scan is good for small amounts of data or cases where board real-estate requirements won’t allow a separate SPI connector. For cases where the SPI bus is controlled by a CPU, check out ScanExpress JET for at-speed Flash programming to get the best of both worlds.

Leave a Reply

Your email address will not be published. Required fields are marked *