Programming SST SPI Flash Using Cheetah Adapter and Flash Center – Total Phase
Programming SST SPI Flash Using Cheetah Adapter and Flash Center

Introduction

Programming SPI memory devices is a common use case for the Cheetah Adapter. There are several ways to do this with the Cheetah adapter, including using Cheetah GUI, Flash Center, or the Cheetah API. Using the Cheetah SPI Host Adapter with the Flash Center software makes it extremely easy to program EEPROM and flash devices. With one Flash Center click the user can erase, program, and verify an entire device. This article focuses on how to program SST SPI flash with Flash Center and Cheetah adapter. Although the following describes the Microchip SPI Flash SST25VF032B SOIC 8 assembled on the Flash SOIC-8 Socket Board, similar steps can be used for other devices. The goal of this article is to demonstrate how to program SST SPI flash and then read back the data

Overview

In this article the Cheetah adapter erases, programs and reads the SST25VF032B. Here the Cheetah adapter is the SPI master and the SPI flash on the socket board is the SPI slave.

It's first helpful to understand the different operations options provided by Flash Center. Specifically, there are three programming modes: Program + Verify, Program, and Program (No Erase). In addition there are Read Device, Verify, and Erase operations.

  • Program + Verify - Writes data to one or more attached memory devices and then reads back the data to verify it for correctness. If the device is an SPI Flash, an erase cycle will be performed first. The erase will cover only those sectors which will be written. Note that it is possible to erase more data than is written if a write ends in the middle of a sector. A warning will be logged if this is the case. Also, if the data to be written is large enough to require the entire device to be erase, and the memory device has an “erase all” instruction, the software will use the “erase all” instruction.

  • Program - Writes data to the device, but does not perform the verification step. If the device is an SPI Flash, an erase cycle will be performed first, with the same caveats as Program + Verify.

  • Program (No Erase) - A special mode for SPI Flash devices. It writes data to the device, but does not perform an erase cycle. This is useful if multiple memory images are to be programmed to the device. Use FF as the pad value when loading each memory image to avoid corrupting previously written data. Because the device may have been programmed prior to this operation, it does not perform the verification step.

  • Read Device - Reads the contents of the selected device and replaces it in the current contents in the data buffer.

  • Verify - Verifies the contents of the selected devices against the contents of the data buffer.

  • Erase - Allows the user to erase the entire memory device or allows the erasure of portion of it. For partial erasure, users can specify the start addresses and length in the erase parameters dialog as either a decimal value or as a hexadecimal value.

SST SPI Memory Details

Some of the SST SPI flash devices (such as SST25VF032B) have two programing modes: Byte Program and Auto Address Increment (AAI) Word Program. Other SST SPI devices devices (as SST25VF064C) have one programing mode: Page Program.

  • Byte Program - is used for programing one byte data.

  • Auto Address Increment (AAI) Word Program - allows multiple bytes of data to be programmed without re-issuing the next sequential address location.

  • Page Program - is used for programming up to one page of data (for example 256 byes in SST25VF064C).

Flash Center Parameter Details

Many memory devices are included in the Flash Center’s parts list by default. Each memory device is described with programming parameters in an XML file. The SST SPI devices with AAI program process have three specials programming parameters: writeAutoAddressIncrementInstruction, writeAutoAddressIncrementSize, and writeAutoAddressIncrementTime. There are several SST devices included in Flash Center, such as the SST25VF032B, and these parameters are already configured in the relevant XML files. For other SST devices that are not included in the default Flash Center parts library, the user can use these parameters in a new XML file.

  • WriteAutoAddressIncrementInstruction - is used to define the AAI program instruction.

  • WriteAutoAddressIncrementSize - is used to define the number of bytes that follow each instance of the AAI instruction. The value must be non-zero, if the AAI program instruction is defined.

  • WriteAutoAddressIncrementTime is used to define the number of milliseconds to complete each AAI write iteration. Unlike writeTime, this value should be the maximum write time, not the minimum. The value must be non-zero, if the AAI program instruction is defined.

SST25VF032B Details

For reference, listed below are several of the SST25VF032B instructions used by Flash Center during the programming process. When creating XML files for SST devices that are not included by default in Flash Center, it's helpful for the user to become familiar with these instructions. See the device datasheet for additional details.

Figure 1: SST25VF032B Instructions List

SST25VF032B Instructions List

  • The SST25VF032B Write Enable instruction (0x06) - sets the Write Enable Latch bit. The Write Enable Latch bit must be set prior to any Write operation (Program / Erase) and Write Status Register instruction.

  • Figure 2: SST25VF032B Write Enable Instruction

    SST25VF032B Write Enable Instruction

  • The SST25VF032B Byte Program instruction (0x02) - is used for programing one byte. This instruction includes the instruction code, three address bytes, and data byte.

  • Figure 3: SST25VF032B Byte Program Instuction

    SST25VF032B Byte Program Instuction

  • The SST25VF032B Auto Address Increment (AAI) Word Program instruction (0xAD) - allows multiple bytes of data to be programmed without re-issuing the next sequential address location. This feature decreases total programming time when multiple bytes or entire memory array is to be programmed. There are three options to determine the completion of each AAI Word program cycle: hardware detection by reading the Serial Output, software detection by polling the BUSY bit in the software status register, or wait TBP. This instruction includes the instruction code, three address bytes, and at least two data bytes.

Figure 4: SST25VF032B AAI Program Instuction with SW Detection

SST25VF032B AAI Program Instuction with SW Detection

Memory Programing and Reading Guidelines

  1. Download and run the latest version of the Total Phase USB Drivers Installer.
  2. Download and unzip the latest version of Flash Center. (?)
  3. Connect the Cheetah adapter to the PC via the USB connector.
  4. Connect the Cheetah adapter to the flash socket board via the I2C/SPI connector. (?)
  5. Launch Flash Center. (?)
  6. Connect the Cheetah adapter to Flash Center. (?)
    1. Click Adapters > Add Adapters.
    2. Select the Cheetah adapter.
    3. Click Add to connect to the adapter.
  7. Enable Target Power. (?)
  8. Click Operations > Choose Target and choose SST25VF032B. (?)
  9. Read the memory device (?).
    1. Click Operations > Read Target.
  10. Figure 5: Cheetah Adapter Reads From SST25V032B

    Cheetah Adapter Reads From SST25VF032B

  11. Program the SST25VF032B, and read (?).
    1. Click Operations > Program + Verify > Click OK.
    2. Click Operations > Read Target.
  12. Figure 6: Cheetah Adapter Writes to SST25VF032B and Reads

    Cheetah Adapter Programs SST25VF032B and Reads

Notes

For additional information, take a look at the Cheetah adapter user manual, Flash Center manual and Flash SOIC-8 Socket Board User Manual.

Have more questions? Submit a request