Quad SPI Flash: Benefits and Uses in General Purpose Microcontrollers
Quad SPI Flash: Benefits and Uses in General Purpose Microcontrollers
BUS SYSTEM
CONFIGURABLE INTERFACES
Ethernet External 4 x 32 bit
3 x SSP/SPI
MAC Mem Ctrl Timers
OTP Key AES
Storage Decryption
LCD
SD/MMC 2 x I 2C RTC
Controller SECURITY
Serial Internal
Flash
SPIFI Memory
Cortex-M4
Memory Up to
40MB/s
LPCMicrocontroller
/CS VCC
Serial
DO(IO1) /HOLD(IO3)
Flash
WP(IO2) CLK
Memory
GND DI (IO0)
8
Pin Level Interface
Most of the 157 serial flashes noted above are SPI-only:
CS
SCK
MOSI
MISO
SCK
MOSI
MISO
Read Command (opcode 0x03), SPI mode, first byte read = 0x38
9
Pin Level Interface 3
Next faster mode is for slave to send read data in dual format
slave drives
Fast Read Dual Out command (opcode 0x3B), first byte read = 0x38 IO3:0
Next faster mode: master sends the address & mode in dual format
mode
opcode 24-bit address byte data
slave drives
IO3:0
10
Pin Level Interface 2
Note that Read command requires the serial flash to provide data
in the clock period after it samples the last bit of the address.
This is a difficult requirement, and constrains the serial clock rate
at which the Read command can be used.
− Most devices limit Read to 20–50 MHz.
Fast Read command adds dummy byte between address and data.
− Allows time for device to get its data pipeline filled and ready.
− Can be used up to max serial clock frequency of device
(50–133 MHz).
CS
SCK
MOSI
MISO
Fast Read command (opcode 0x0B), SPI mode, first byte read = 0x31 11
Pin Level Interface 4
Quad mode adds signals IO3:2; here slave sends data in quad format
If the mode byte in the Read Dual/Quad I/O command is 0xA5, most
serial flashes will not expect the next command to have an opcode.
mode
opcode 24-bit addr byte 24-bit addr
Fast Read Quad I/O command (opcode 0xEB), mode byte 0xAF sets No Opcode mode for next command
Initialization API
− Checks what kind of device
− Writes to control registers for optimal read performance
Write API
− Block writes
− Erase
− Write protection.
14
SPIFI – Supported Devices
15
Supported / Unsupported Devices
Three requirements for serial flash include most existing devices:
− Read JEDEC ID command
− Page programming command (byte programming not supported)
− At least one erase command that is uniform across the whole device
Most (all?) of the 17 unsupported devices lack page
programming:
− Elite F25L004, F25L008, F25L016
− Eon 25B64
− SST 25[VW]F512, 25[VW]F010, 25[LVW]F020, 25[VW]F040,
25[VW]F080, 25VF016, 25VF032.
157 serial flash devices from 11 vendors meet these
requirements.
95 have been successfully tested with the SPIFI driver API.
Most of the untested 62 are old, small, more or less obsolete. 16
Thank You
Santa Clara, CA
August 2011 17