I am reading the datasheet for the A25L032 "32Mbit I/O Serial Flash Memory". The page 15 of this datasheet explains that there are non-volatile bits in the status register that can be used to "write protect" a section of the flash memory.

Flash is a non-volatile memory and it changes when we write to it and never otherwise. It has features which prevent data corruption also e.g at power up. To do write first we send a "write enable" instruction and then once write is complete the "write enable" bit inside is automatically reset so no one can ever "accidently write" something into the Flash. Now why in the world would one need bits to write protect parts of the flash??

To top this up, there are also non-volatile "status register protection" bits.


Another aspect of this problem is "software protect mode" and "hardware protect mode". These are stated on page 7 of the datasheet. The software protect mode is when we use the block protect, sector protect, top/bottom and complementary protect bits. Hardware protect is when we set the "write protect" bit so the bits I just mentioned before themself become write protected. What is the logic behind using the term "software protect" and "hardware protect" for these two?


1 Answer 1


So that only some of the flash memory can be updated. This is useful in devices that allow an end-user firmware update but also store some "base" firmware on the same device while preventing a bug or exploit in the base firmware from breaking everything.

  • \$\begingroup\$ Aha. I see, that makes perfect sense. So we want that sensitive data not be overwritten. \$\endgroup\$
    – quantum231
    Jun 10, 2016 at 19:44
  • \$\begingroup\$ Or to protect the bootloader from accidental mis-pointing while loadering a new firmware version \$\endgroup\$
    – Asmyldof
    Jun 10, 2016 at 19:46
  • \$\begingroup\$ OK, and what about write protection for status register? Why would one need to do that? The page 15 of the datasheet actually explains all the bits in the status registers. \$\endgroup\$
    – quantum231
    Jun 10, 2016 at 19:49
  • \$\begingroup\$ @quantum231 for the same reason - to stop an end-user simply writing to the status register to unlock the pages. \$\endgroup\$ Jun 10, 2016 at 21:19
  • \$\begingroup\$ A lot of time, it's the BIOS boot block which is stored in this read-only region. The boot block can contain the CRTM which gives a hash of the BIOS to the TPM and is used for measured boot. \$\endgroup\$
    – forest
    Mar 24, 2019 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.