diff --git a/components/storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp b/components/storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp index 5716f9d179..194c101ede 100644 --- a/components/storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp +++ b/components/storage/blockdevice/COMPONENT_SPIF/SPIFBlockDevice.cpp @@ -88,6 +88,7 @@ enum spif_default_instructions { SPIF_RSTEN = 0x66, // Reset Enable SPIF_RST = 0x99, // Reset SPIF_RDID = 0x9f, // Read Manufacturer and JDEC Device ID + SPIF_ULBPR = 0x98, // Clears all write-protection bits in the Block-Protection register }; // Mutex is used for some SPI Driver commands that must be done sequentially with no other commands in between @@ -169,7 +170,7 @@ int SPIFBlockDevice::init() // SST devices come preset with block protection // enabled for some regions, issue write disable instruction to clear _set_write_enable(); - _spi_send_general_command(SPIF_WRDI, SPI_NO_ADDRESS_COMMAND, NULL, 0, NULL, 0); + _spi_send_general_command(SPIF_ULBPR, SPI_NO_ADDRESS_COMMAND, NULL, 0, NULL, 0); break; }