The "enable write status" command has to be sent before "write status" command to unlock memory area.

Dependencies:   mbed

Fork of SST25VF by Pierre Emmibed

Revision:
1:533050c756e0
Parent:
0:1633dfa4b768
--- a/SST25VF.cpp	Sun Jan 15 13:51:16 2012 +0000
+++ b/SST25VF.cpp	Sun Dec 28 23:48:29 2014 +0000
@@ -45,6 +45,10 @@
 
 void SST25VF::unlock() {
     select();
+    _spi.write(EWSR);
+    deselect();
+
+    select();
     _spi.write(WRITE_STATUS);
     _spi.write(0);
     deselect();