SPI Single IO NOR Flash Library for Nucleo F767ZI Interfacing

Dependents:   SPI_FLASH_MEM

Fork of W25X40BV by Johnny Yam

Files at this revision

API Documentation at this revision

Comitter:
shivanandgowdakr
Date:
Tue May 22 09:44:34 2018 +0000
Parent:
5:c2707c92ecb5
Child:
7:690ac48a0b8c
Child:
8:9f5a31575cdd
Commit message:
Missing Chip Disable Added

Changed in this revision

S25FL256S.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/S25FL256S.cpp	Mon May 21 07:50:39 2018 +0000
+++ b/S25FL256S.cpp	Tue May 22 09:44:34 2018 +0000
@@ -216,7 +216,7 @@
 long S25FL256S::raedLong(int addr)
 {
     //Read the 4 bytes from the eeprom memory.
-    writeEnable();
+   
     chipEnable();
     this->write(FOUR_READ);
     this->write((addr & ADDR_BMASK3) >> ADDR_BSHIFT3);
@@ -228,7 +228,7 @@
     long three = this->write(DUMMY_ADDR);
     long two = this->write(DUMMY_ADDR);
     long one = this->write(DUMMY_ADDR);
-
+    chipDisable();
     //Return the recomposed long by using bitshift.
     return ((four << 0) & 0xFF) + ((three << 8) & 0xFFFF) + ((two << 16) & 0xFFFFFF) + ((one << 24) & 0xFFFFFFFF);
 }