Programming a Dual SPI Flash Using the Promira Serial Platform and the Control Center Serial Software – Total Phase
Programming a Dual SPI Flash Using the Promira Serial Platform and the Control Center Serial Software

Introduction

Programming Dual SPI memory devices is a common use case for the Promira™ Serial Platform with SPI Active Level 1 and 2 Applications. There are several ways to do this with the Promira™ Serial Platform, including using Control Center Serial, Flash Center, or the Promira API. This article focuses on how to take the information in a flash datasheet and execute the commands in Control Center Serial. Although the following describes the Micron SPI Flash N25Q00AA 3.3V SOIC 16 assembled on the Flash SOIC-16 Socket Board - 10/34, similar steps can be used for other devices. The goal of this article is to demonstrate how to write several bytes to a specific address and then read back those bytes.

Overview

In this article the Promira platform erases the N25Q00AA, and writes and reads three bytes (0x0A 0x0B 0x0C) from address 0x000008. Here the Promira platform is the SPI master and the N25Q00AA on the Flash SOIC-16 Socket Board - 10/34 is the SPI slave. The Promira platform is connected to the N25Q00AA on the Flash SOIC-16 Socket Board - 10/34 through the 34-34 I2C/SPI cable. The Promira platform supplies 3.3V SPI signals and 5V VDD signal to the Flash SOIC-16 Socket Board - 10/34. For additional information take a look at the Flash Socket Board - 10/34 User Manual and the N25Q00AA Datasheet

N25Q00AA Details

For reference, listed below are several of the N25Q00AA commands that are used in this article. Figure 1 shows partial of the N25Q00AA commands List. See the N25Q00AA datasheet for additional details.

Figure 1: N25Q00AA Commands List

N25Q256A Instructions List

Write Enable Command

The N25Q00AA write enable command (0x06) sets the write enable latch bit. The write enable latch bit must be set prior to any write command (Program, Erase, Write, Enter 4 Byte Address Mode, and Exit 4 Byte Address Mode).

Figure 2: N25Q00AA Write Enable Command

Dual Input Fast Program Command

The N25QQ00A dual input fast program command (0xA2) is used for programming dual SPI data.

Figure 3: Dual Input Fast Program Command

Dual Input/Output Fast Read Command

The N25QQ00A dual input/output fast read command (0x3B) is used for reading dual SPI data.

Figure 4: Dual Input/Output Fast Read Command

Writing and Reading Guidelines

    1. Connect the Promira platform USB connector to the PC USB connector.
    2. Follow the instructions in Section 3.2 - Connectivity of the Promira platform user manual to configure the Ethernet over USB interface.
    3. Download and unzip the latest version of Control Center Serial. (?)
    4. Connect the Promira platform I2C/SPI connector to the Flash SOIC-16 Socket Board - 10/34 with the N25Q00AA through 34-34 cable.
    5. Launch Control Center Serial. (?)
    6. Connect Control Center Serial to the Promira platform. (?)
      1. Click Adapter, and choose Connect.
      2. Select the Promira platform.
      3. Click OK to connect to the Promira platform.
    7. Click Adapter, and choose Multi I/O SPI.
    8. Click Adapter, disable I2C Pulls-Ups, enable Target Power (Pin 4,6), disable IO Power (Pin 22,24), and configure Level Shift to 3.3V. (?)
    9. Configure Promira SPI Mode to 0, Bit Order to MSB, and SS Polarity to Low, and Bitrate to 40000 KHz.(?)
    10. Configure Promira to dual SPI mode (?).
      1. Configure IO Mode to: Single, Single, Single.
      2. Read the enchanced volatile configuration register
        1. Enter 65 00 in Command
        2. Leave Addr & Data empty
        3. Click Send
        4. Verify 00 DF is read back
      3. Send the write enable command to set the Write Enable Latch bit
        1. Enter 06 in Command
        2. Leave Addr & Data empty
        3. Click Send
      4. Change the IO mode to dual by modifying the enhanced volatile configuration register
        1. Enter 61 9F in Command
        2. Leave Addr & Data empty
        3. Click Send
      5. Configure IO Mode to: Dual, Dual, Dual.
      6. Read the enchanced volatile configuration register
        1. Enter 65 in Command
        2. Leave Addr & Data empty
        3. Enter 1 in Number of Words to Read
        4. Click Read
        5. Verify 9F is read back
      7. Read the memory device ID
        1. Enter AF in Command
        2. Leave Addr & Data empty
        3. Enter 3 in Number of Words to Read
        4. Click Read
        5. Verify 20 BA 21 is read back

      Figure 5: Configure Promira to Dual SPI Mode

       

    11. Write and Read Memory (?).
      1. Send the write enable command to set the Write Enable Latch bit
        1. Enter 06 in Command
        2. Leave Addr & Data empty
        3. Click Send
      2. Erase a sector of memory
        1. Enter DB in Command
        2. Enter 00 00 08 in Addr
        3. Leave Data empty
        4. Click Send
      3. Verify the erase is complete by reading the status register
        1. Enter 70 in Command
        2. Leave Addr & Data empty
        3. Enter 1 in Number of Words to Read
        4. Click Read
        5. Verify 80 is read back
      4. Send the write enable command to set the Write Enable Latch bit
        1. Enter 06 in Command
        2. Leave Addr & Data empty
        3. Click Send
      5. Write 3 bytes of data to address 00 00 08
        1. Enter A2 in Command
        2. Enter 00 00 08 in Addr
        3. Enter 0A 0B 0C in Data
        4. Click Send
      6. Verify the write is complete by reading the status register
        1. Enter 70 in Command
        2. Leave Addr & Data empty
        3. Enter 1 in Number of Words to Read
        4. Click Read
        5. Verify 80 is read back
      7. Read the data back using a dual IO fast read command
        1. Enter 3B in Command
        2. Enter 00 00 08 in Addr
        3. Leave Data empty
        4. Enter 5 in Number of Words to Read
        5. Click Read
        6. Verify 00 00 0A 0B 0C is read back

      Figure 6: Promira Platform Writes & Reads N25Q00AA Memory

       

Notes

For additional information, take a look at the Promira platform user manual, Control Center Serial user manual, and Flash Socket Board - 10/34 user manual.

Have more questions? Submit a request