This week’s article is about using a CheetahTM SPI Host Adapter for programming SPI EEPROM and flash devices, which can be done using CheetahTM GUI Software, Flash CenterTM Software, or the CheetahTM Software API. This example will use the ST Micro SPI Flash M25P32 mounted on an SPI Flash Demo Board, and the Flash Center Software to program SPI flash devices and then read back the data.
Using the Cheetah SPI Host Adapter with the Flash Center software makes it easy to program SPI EEPROM and SPI Flash devices. With one Flash Center Software click, erase, program, and verify an entire device. Note – with some modification, this example can be used for other devices.
Overview of the Flash Center SoftwareIn this example, the Cheetah adapter erases, programs and reads the M25P32. Here the Cheetah adapter is the SPI master and the SPI flash on the SPI Flash Demo board is the SPI slave.
First, we will go over the 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.
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 entire memory can be erased using the Bulk Erase instruction, or one sector at a time using the Sector Erase instruction. For reference, the M25P32 instructions list and memory map are provided below. For additional information about the SPI Flash M25P32, please refer to the M25P32 datasheet.
Part 2 of this article provides the instructions for programming an SPI device.
For more information, please refer to the following documents:
High-Speed Flash Demo Board User Manual
Programming SPI Flash Using Cheetah Adapter and Flash Center
We hope this answers your question. If you have other questions about our Cheetah, SPI Host Adapter or other Total Phase products, feel free to email us at sales@totalphase.com or submit a request for technical support.