TotalPhase-Blog-Erlebniswelten

Program SPI Flash with Promira Serial Platform & Flash Center Software

Programming SPI memory devices is a common use case for the Promira™ Serial Platform with SPI Active - Level 1 Application. There are several ways to do this with the Promira Serial Platform with SPI Active - Level 1 Application, including using Control Center™ Serial Software, Flash Center™ Software, or the Promira Software API from Total Phase.

Using the Promira platform 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 SPI flash with Flash Center and a Promira platform. Although the following describes the ST Micro SPI Flash M25P32 assembled on the High-Speed SPI Flash Demo Board, similar steps can be used for other devices. The goal of this article is to demonstrate how to program SPI flash and then read back the data.

In this article the Promira platform erases, programs and reads the M25P32. Here the Promira platform is the SPI master and the SPI flash on the SPI Flash Demo 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.

M25P32 Details

The 32 Mbit (4M bytes) SPI Flash M25P32 found on the SPI Flash Demo Board has 64 sectors. Each sector has 256 pages or 65,536 (64K, 0x10000) bytes. Each page has 256 bytes. Therefore, the memory has 16,384 pages or 4,194,304 (0x400000) bytes. The whole memory can be erased using the Bulk Erase instruction, or a sector at a time, using the Sector Erase instruction. For reference, provided below are the M25P32 instructions list and memory map.

MP25P32_Memory_Map
M25P32_Instuctions_List_1_(1)

Memory Programming and Reading Guidelines

  1. Connect the Promira platform USB connector to the PC USB connector.
  2. Follow the instructions of the Promira platform user manual to configure the Ethernet over USB interface.
  3. Download and unzip the latest version of the Total Phase Flash Center.
  4. Connect the Promira platform I2C/SPI connector to the SPI Flash Demo board through the 34-10 cable.
  5. Launch Flash Center.
  6. Connect the Promira platform to Flash Center.
    1. Click Adapters > Add Adapters.
    2. Select the Promira platform.
    3. Click Add to connect to the Promira platform.
  7. Configure Target Power (Pin 4, 6) to 5V; IO Power (Pin 22, 24) to Disable, Level Shift to 3.3V. Enable Target Power.
  8. Click Operations > Choose Target and choose M25P32.
  9. Configure Bit Rate to 12.5 MHz.
  10. Read the memory device.
    1. Click Operations > Read Target.
Promira_platform_Reads_From_M25P32

11. Program the M25P32, and read.

a. Click Operations > Program + Verify.
b. Click Operations > Read Target.

Promira_platform_Writes_to_M25P32_and_Reads

SPI Flash memory supported by Flash Center

 

Atmel:
AT25DF041A   AT25F1024A  AT25F2048  AT25F4096  AT25F512A  AT25FS010  AT25FS040  
AT26DF041  AT26DF081A  AT26DF161  AT26DF161A  AT26DF321  AT26F004  AT45DB011B  
AT45DB021B  AT45DB041B  AT45DB041D/256  AT45DB041D/264  AT45DB081B  
AT45DB081D/256  AT45DB081D/264  AT45DB161D/512  AT45DB161D/528  AT45DB321C  
AT45DB321D/512  AT45DB321D/528   AT45DB642D/1024  AT45DB642D/1056

ISSI:
IS25CD010  IS25CD025  IS25CD512  IS25LP032/032A/032D  IS25LP064/064A/064B
IS25LP128/128B/128D  IS25LQ010B  IS25LQ016B  IS25LQ020B  IS25LQ025B
IS25LQ032B  IS25LQ040B  IS25LQ080  IS25LQ080B  IS25LQ512B
IS25WP016/016C/016D  IS25WP032/032A/032D  IS25WP064/064A
IS25WP080/080C/080D  IS25WP128  IS25WQ020  IS25WQ040

Micron Technology:
M25P05-A  M25P10-A  M25P128  M25P16  M25P20  M25P32  M25P40  M25P64  M25P80
M25PE10  M25PE16  M25PE20  M25PE40  M25PE80  M45PE10  M45PE16  M45PE20
M45PE40  M45PE80 

Macronix:
MX25L1005  MX25L1006E  MX25L1021E  MX25L1026E  MX25L12835F  MX25L12839F
MX25L12855F  MX25L12873F  MX25L1605 MX25L1605A  MX25L1605D  MX25L1606E 
MX25L1633E  MX25L1635E  MX25L1636E  MX25L1673E  MX25L2005  MX25L2006E  MX25L2026E  
MX25L25635F  MX25L25639F  MX25L25655F  MX25L3205  MX25L3205A  MX25L3205D 
MX25L3206E  MX25L3235E  MX25L3239E  MX25L3273E  MX25L4005A  MX25L4006E  
MX25L4026E  MX25L512  MX25L5121E  MX25L512E  MX25L6405  MX25L6405D  MX25L6406E  
MX25L6435E  MX25L6439E  MX25L6445E  MX25L6456E  MX25L6473E  MX25L8005  MX25L8006E
MX25L8035E  MX25L8036E  MX25L8073E  MX25U3235F  MX25U6435F  MX25V1006E
MX25V2006E  MX25V4006E  MX25V4035  MX25V512E  MX25V8006E  MX25V8035
MX66L1G45G  MX66L51235F


Micron
N25Q008A 8-Mbit 1,8 V  N25Q00AA 1-Gbit 1,8 V  N25Q00AA 1-Gbit 3,3 V
N25Q016A 16 Mbit 1,8 V  N25Q032A 32-Mbit 1,8 V  N25Q032A 32-Mbit 3,3 V
N25Q064A 64-Mbit 1,8 V  N25Q064A 64-Mbit 3,3 V  N25Q128A 128-Mbit 1,8 V
N25Q128A 128-Mbit 3,3 V  N25Q256A 256-Mbit 1,8 V  N25Q256A 256-Mbit 3,3 V
N25Q512A 512-Mbit 1,8 V  N25Q512A 512-Mbit 3,3 V

Chingis Technologies:
Pm25LQ010B  Pm25LQ020B  Pm25LQ025B  Pm25LQ040B  Pm25LQ512B  Pm25LV010
Pm25LV010A  Pm25LV016  Pm25LV016B  Pm25LV020  Pm25LV040  PM25LV080
PM25LV080B  PM25LV512  Pm25LV512A

Spansion:
S25FL004A  S25FL008A  S25FL016A  S25FL032A  S25FL032P  S25FL040A Uniform 
S25FL064A  S25FL064P  S25FL116K  S25FL128P_256KB  S25FL128P_64KB  
S25FL128S_256KB  S25FL128S_64KB  S25FL204K  S25FL208K  S25FL216K  
S25FL256S_256KB  S25FL256S_64KB  S25FL512S

Intel:
S33 16-Mbit  S33 32-Mbit  S33 64-Mbit

SST
SST25LF020A  SST25LF040A  SST25PF020B  SST25PF040B  SST25PF080B
SST25VF010  SST25VF010A  SST25VF016B  SST25VF020  SST25VF020B
SST25VF032B  SST25VF040  SST25VF040B  SST25VF064C  SST25VF080B
SST25VF512  SST25VF512A  SST25WF010  SST25WF020  SST25WF020A
SST25WF512

Winbond/NexFlash:
W25P10/NX25P10  W25P16/NX25P16  W25P20/NX25P20  W25P32/NX25P32
W25P40/NX25P40  W25P80/NX25P80  W25Q16  W25Q32  W25Q80  W25X10
W25X10L  W25X16  W25X20  W25X20L  W25X32  W25X40  W25X40L

SPI Flash programming tools

SF600Plus SPI NOR Flash Programmer
SF600Plus
The SF600 Plus is a high-speed ISP programmer for updating the on-board soldered SPI flash.

Product is discontinued

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*
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*