Re: NOT ABLE TO WRITE TO STATUS REGISTER OF SST25VF040B spi flash
The only bits I see that can be written in the SR are the BPL, BPn bits. Some care is required when altering these bits. For example BPL can be written regardless of the state of #WP, but the BPn bits can only be consistently written if #WP is high; if #WP is low then BPL determines whether or not you can write the BPn bits. Keep in mind that the #WP is part of a failsafe mechanism and that you still need to execute the WREN instruction. As per the datasheet:
Prior to executing any Byte Program, Auto Address Increment (AAI) programming, Sector Erase, Block Erase, Write STATUS Register, or Chip Erase instructions, the Write Enable (WREN) instruction must be executed first.