Reading Device ID from SPI Flash Using Aardvark Adapter and Control Center – Total Phase
Reading Device ID from SPI Flash Using Aardvark Adapter and Control Center

Introduction

Programming and reading SPI memory devices is a common use case for the Aardvark Adapter. There are several ways to do this with the Aardvark adapter, including using Control Center, Flash Center, or the Aardvark API. This article focuses on how to take the information in a flash datasheet and execute the Read Devide ID command in Control Center. Although the following describes the SPI Flash M25P32 found on the SPI Flash Demo Board, similar steps can be used for other devices.

Overview

In this article the Aardvark adapter reads the Device ID from the memory. Here the Aardvark adapter is the SPI master and the SPI flash on the demo board is the SPI slave. The article uses an M25P32 instruction, which is described below.

Figure 1: M25P32 Instructions List

M25P32 Instructions List

The M25P32 Read Identification instruction (0x9f) allows the identification data to be read. This instruction includes the instruction opcode. Then the identification data is shifted out. The M25P32 Read Identification Data Out Sequence is 20 20 16 h.

Figure 2: M25P32 Read Identification Instruction

M25P32 Read Identification Instruction

Figure 3: M25P32 Read Identification Data Out Sequence

M25P32 Read Identification Data Out Sequence

Memory Read Device ID Guidelines

  1. Download and run the latest version of the Total Phase USB Drivers Installer.
  2. Download and unzip the latest version of Control Center. (?)
  3. Connect the Aardvark adapter to the PC via the USB connector.
  4. Connect the Aardvark adapter to the SPI flash demo board via the I2C/SPI connector. (?)
  5. Launch Control Center. (?)
  6. Connect the Aardvark adapter to Control Center. (?)
    1. Click Configure Aardvark adapter.
    2. Select the Aardvark adapter.
    3. Click OK to connect to the adapter.
  7. Configure the Ploarity to Rising/Falling, Phase to Sample/Setup, Bitrate to 1MHz, Bit Order to MSB, and SS Polarity to SS Active Low. (?)
  8. Click Aardvark, and enable Target Power. (?)
  9. Read memory Device ID.
    1. Enter 9F 00 00 00 in the MOSI Message > Click Send. (The 3 extra 00 bytes are required to clock in the 3-byte Device ID from the memory on the MISO line.)
    2. The memory responds with Device ID 20 20 16.
  10. Figure 4: Aardvark Adapter Reads M25P32 Device ID

    Aardvark Adapter Reads M25P32 Device ID

Notes

For additional information, take a look at the Aardvark adapter user manual, Control Center manual and High Speed SPI Flash Demo Board User Manual.

Have more questions? Submit a request