You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,9 @@ SPIFlash flash(33);
97
97
98
98
<sub>* Optional</sub>
99
99
100
+
##### Note on SFDP discovery
101
+
As of v3.2.1, SFDP parameter discovery is an user controlled option. To get the library to work with SFDP compatible flash memory chips that are not officially supported by the library, the user must uncomment '//#define USES_SFDP' in 'SPIMemory.h'.
102
+
100
103
##### Notes on Address overflow and Error checking
101
104
- The library has Address overflow enabled by default - i.e. if the last address read/written from/to, in any function, is 0xFFFFF then, the next address read/written from/to is 0x00000. This can be disabled by uncommenting ```#define DISABLEOVERFLOW``` in SPIMemory.h. (Address overflow only works for Read / Write functions. Erase functions erase only a set number of blocks/sectors irrespective of overflow.)
102
105
- All write functions have Error checking turned on by default - i.e. every byte written to the flash memory will be checked against the data stored on the Arduino. Users who require greater write speeds can disable this function by setting an optional last 'errorCheck' argument in any write function to NOERRCHK - For eg. call the function ```writeByte(address, *data_buffer, NOERRCHK)``` instead of ```writeByte(address, *data_buffer)```.
//SPIFlash flash(SS1, &SPI1); //Use this constructor if using an SPI bus other than the default SPI. Only works with chips with more than one hardware SPI bus
96
102
97
103
voidsetup() {
104
+
98
105
Serial.begin(BAUD_RATE);
99
-
#if defined (ARDUINO_ARCH_SAMD) || (__AVR_ATmega32U4__) || defined(ARCH_STM32)
100
-
while (!Serial) ; // Wait for Serial monitor to open
101
-
#endif
106
+
#if defined (ARDUINO_ARCH_SAMD) || (__AVR_ATmega32U4__) || defined(ARCH_STM32) || defined(NRF5)
107
+
while (!Serial) ; // Wait for Serial monitor to open
108
+
#endif
102
109
delay(50); //Time to terminal get connected
103
-
Serial.print(F("Initialising Flash memory"));
104
-
for (int i = 0; i < 10; ++i)
110
+
Serial.print(F("Initialising"));
111
+
for (uint8_t i = 0; i < 10; ++i)
105
112
{
106
113
Serial.print(F("."));
107
114
}
108
115
Serial.println();
109
-
#if defined (CHIPSIZE)
110
-
flash.begin(CHIPSIZE); //use flash.begin(CHIPSIZE) if using non-Winbond flash (Refer to '#define CHIPSIZE' above)
111
-
#else
116
+
randomSeed(analogRead(RANDPIN));
112
117
flash.begin();
113
-
#endif
118
+
//To use a custom flash memory size (if using memory from manufacturers not officially supported by the library) - declare a size variable according to the list in defines.h
--> Fixes issue #135 : The addition of the SFDP checking to _chipID resulted in a sudden (very large) increase in compiled code size. As of the current version (v3.2.1), SFDP checking is an user controlled option. To get the library to work with SFDP compatible flash memory that is not officially supported, the user must uncomment '//#define USES_SFDP' in 'SPIMemory.h'.
12
+
13
+
--> Moved `bool _loopedOver` from being a local variable in `getAddress()` to a global one. Now it actually does what it was meant to do - i.e. prevent looping over data a second time.
14
+
15
+
Enhancements
16
+
--> The way the basic functions execute has been modified to keep the function runtime the same (or improved) while reducing their memory footprint.
17
+
18
+
Test sketch - FlashDiagnostics.ino from v3.2.0 with #RUNDIAGNOSTIC commented out
Copy file name to clipboardExpand all lines: library.properties
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
name=SPIMemory
2
-
version=3.2.0
2
+
version=3.2.1
3
3
author=Prajwal Bhattaram
4
4
maintainer=Prajwal Bhattaram <marzogh@icloud.com>
5
5
sentence=SPI Memory library for Arduino. (Formerly SPIFlash)
6
-
paragraph=Starting v3.2.0, this library enables read, write, erase and power functions on all SFDP compatible Flash chips. Older versions are only compatible with specific chips as listed here - < v2.6.0 is compatible with W25X05**, W25X10**, W25X20**, W25X40**, W25Q80**, W25Q16**, W25Q32** & W25Q64**. All other Winbond flash chips can also be used with this library from v2.6.0 onwards. A number of Microchip, Cypress & Spansion chips - W25Q128**, W25Q256**, SST25VF064C, SST26VF064B & S25FL116K - can be used with with the library from v3.0.0 onwards. Refer to change log for further information about this release.
6
+
paragraph=This library enables read, write, erase and power functions on number of compatible flash memory chips. Refer to change log for further information about this release. To download any version of this library pre v3.2.0 (pre name-change from SPIFlash please visit https://github.com/Marzogh/SPIMemory/releases?after=v3.2.0 )
0 commit comments