TotalPhase-Blog-Erlebniswelten

Read device ID of an SPI Flash

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.

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.

M25P32_Instuctions_List_1

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.

M25P32_Read_Identification_Instruction
M25P33_Read_Identification_Data

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 port.
  4. Connect the Aardvark adapter to the SPI Flash demo board via the I2C/SPI connector. 
  5. Start 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 on Aardvark and enable Target Power. 
  9. Read Storage ID.
    1. Enter 9F 00 00 00 in MOSI message> Click Send. (The 3 additional 00 bytes are required to transfer the 3-byte device ID from the MISO line's memory.) 
    2. The storage responds with the device ID 20 20 16. (In this example)
Control_Center_Read_Aardvark-i2c-spi

SPI Host Adapter

Aardvark I2C/SPI Host AdapterAardvark I2C/SPI Host Adapter
Aardvark I2C/SPI Host Adapter
TP240141
Erase, program, verify Memory Devices - The Aardvark I2C/SPI Host Adapter is a fast and powerful I2C bus and SPI bus host adapter through USB.

€309.00*
Cheetah SPI Host Adaptercheetah-Pin-belegung
Cheetah SPI Host Adapter
TP280121
The Cheetah SPI Host Adapter is a high-speed SPI adapter that is capable of communicating over SPI at up to 40+ MHz.

€395.00*
Promira I2C/ SPI/ eSPI Platform
TP500110-S
Promira is a universal hardware platform usable for a variety of applications, like I2C, SPI and eSPI.

Variants from €900.00*
€1,060.00*