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

Files at this revision

API Documentation at this revision

Comitter:
timucinanuslu
Date:
Sun Dec 28 23:48:29 2014 +0000
Parent:
0:1633dfa4b768
Commit message:
send "enable write status" before "write status" sending

Changed in this revision

SST25VF.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 1633dfa4b768 -r 533050c756e0 SST25VF.cpp
--- 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();