100 MicroBlaze Development Kit Spartan-3E 1600 Edition User Guide
www.xilinx.com UG257 (v1.1) December 5, 2007
Chapter 12: SPI Serial Flash R
Re-apply power to the MicroBlaze Development Kit board.
Programming the SPI Flash with the XSPI Software
Open a command prompt or DOS box and change to the XSPI installation directory.
The XSPI installation software also includes a short user guide, in addition to XAPP445.
Type xspi at the prompt to view quick help.
Type the following command at the prompt to program the SPI Flash using the SPI-
formatted Flash file generated earlier. This verifies that the SPI Flash is indeed an M25P16
SPI Flash and then erases, programs, and finally verifies the Flash.
C:\xspi>xspi -spi_dev m25p16 -spi_epv -mcs -i MySPIFlash.mcs -o output.txt
A disclaimer notice appears on the screen. Press the Enter key to continue. The entire
programming process takes slightly longer than a minute, as shown in Figure12-17.
Figure 12-16: Installing the JP8 Jumper Holds the FPGA in Configuration State
PROG

GND

JP8

PROG
PROG

GND

DEFAULT
NO JUMPER

JP8

PROG
DEFAULT
NO JUMPER
UG257_12_16_061506
a) No Jumper: FPGA Operational (default) b) Jumper Installed: FPGA Held in
Configuration State, I/Os in High Impedance
Figure 12-17: Programming the M25P16 SPI Flash with the XSPI Programming
Utility
-==< Press ENTER to accept notice and continue >==-
Start : Mon Feb 27 13:37:07 2006
==> Checking SPI device [STMicro_M25P16_ver_00100] ID code(s)
- density = [2097152] bytes
= [16777216] bits
- mfg_code = [0x20]
- memory_type = [0x20]
- density_code = [0x15]
+-----------------------------------------+
| Device ID code(s) check ====> [ OK ] |
+-----------------------------------------+
=> Operation: Erase
=> Operation: Program and Verify using file [MySPIFlash.mcs]
Programmed [283776] of [283776] bytes (w/ polling)
Verified [283776] of [283776] bytes (0 errors)
--> Total byte mismatches [0] (see [temp.txt])
Finish : Mon Feb 27 13:38:22 2006
Elapsed clock time (00:01:15) = 75 seconds
UG257_12_17_060806