How Can I Use the SPI Host Adapter to Program and Erase Selected Areas in the Serial Flash Device in the Test Lab and for Production?

Question from the Customer:

I am using the Cheetah SPI Host Adapter and the Cheetah GUI Software to program a Macronix MX25R3235F serial flash. I see it’s easy to delete and program the whole flash, but can I do that for specific areas? We are using hex files that are optimized to smaller size (doesn’t have the full size extension) – but the programmer converts it to full size image and the time of programming is the same.

  • Is  there an option to write only the content that is not '1' using the programmer? For example, only the 256KB image that we would like to flash?
  • Is there an option to delete a specific area based on the size of the image to write?

In addition, this programming is going to production. What is the best way to automate this process – could we use shell scripts?

Response from Technical Support:

Thanks for your questions! The Cheetah GUI software is a general purpose software for programming SPI based devices. To write a chunk of data, the "Insert" option can be used. You can place a cursor at the starting point of part memory to be written in the hex editor and click "insert". This options pops up a window for .bin file input. The contents of bin file will be written starting from memory location pointed by the cursor.

 MOSI Message via GUI

Figure 1: Option to Insert Data

 Similarly, the contents of a memory block can be zero'd (erased) using the "Zeroes" option. To erase a block of contiguous memory, you can place a cursor at the starting point of part of memory locations to be erased in the hex editor, and click "Zeros", which pops up a dialog box to insert number of zeroes to be filled starting from the position of the cursor. For more information, please refer to the Hex Editor section of the Cheetah GUI Software Manual.

 Insert zeros to program sector

Figure 2: Option to Erase Selected Area

 The Cheetah GUI cannot be controlled using shell commands. However, you can use Cheetah Software API and write a custom program that fits your system requirements. Cheetah API comes with support for multiple OS (Windows, Linux, and Mac) and multiple languages (C, Python, Visual Basic, and C#), and includes examples. You can modify the API examples to target your specific devices. For additional information please refer to the Cheetah API Documentation.

 Cheetah adapter API for Windows 64-bit (other platforms also available on our website).

We hope this answers your questions. Additional resources that you may find helpful include the following:

We hope that answers your questions. If you have other questions about our host adapters or other Total Phase products, feel free to email us at, or if you already own one of our devices and have a technical question, please submit a request for technical support.

Leave a Reply