The Cheetah SPI Host Adapter is popular for its fast SPI programming capabilities. In this week's Support Question of the Week, we will feature a two-part series focusing on how to program a single sector of an SPI flash device using the Cheetah adapter with the Flash Center Software.
This two-part article is also available in our Total Phase Knowledge Base. The Knowledge Base consists of popular FAQ's and technical articles provided by our very own support team.
OverviewUsing the Aardvark I2C/SPI Host Adapter or the Cheetah SPI Host Adapter with the Flash Center software makes it extremely easy to program EEPROM and flash devices. With one click the user can erase, program, and verify an entire device. But what if you only need to program a single sector of a flash memory? This article explains how to use Flash Center to modify a single sector of the device, while not affecting the other sectors.
It's first helpful to understand the different programming options provided by Flash Center. Specifically, there are three programming modes: Program + Verify, Program, and Program (No Erase).
For additional information about the Flash Center program modes, take a look at the Flash Center manual.
To program a single sector with Flash Center, we will take advantage of the following properties of flash devices:
By manually erasing specific sectors along with using the Program (No Erase) mode, data can be written to any sector of a flash device.
M25P32 DetailsThe 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 additional information about the SPI Flash M25P32 take a look at the M25P32 datasheet.
Part 2 of this special feature will be posted soon! The second installment will focus on how to program data to the first sector, and then program data to the second sector without overwriting data in the first sector.
Questions? Feel free to email us at sales@totalphase.com or support@totalphase.com.