From 1de2c10577a41376bfefc94cbd159ae27b77f163 Mon Sep 17 00:00:00 2001 From: Zou Hanya Date: Sun, 19 Nov 2017 12:02:59 +0900 Subject: [PATCH 01/12] Add missing break statements in _beginSPI() --- src/FLASHIO.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/FLASHIO.cpp b/src/FLASHIO.cpp index 5227e84..5146105 100755 --- a/src/FLASHIO.cpp +++ b/src/FLASHIO.cpp @@ -188,18 +188,22 @@ bool SPIFlash::_beginSPI(uint8_t opcode) { _nextByte(WRITE, opcode); _nextByte(WRITE, DUMMYBYTE); _transferAddress(); + break; case SECTORERASE: _nextByte(WRITE, opcode); _transferAddress(); + break; case BLOCK32ERASE: _nextByte(WRITE, opcode); _transferAddress(); + break; case BLOCK64ERASE: _nextByte(WRITE, opcode); _transferAddress(); + break; default: _nextByte(WRITE, opcode); From 9633c2fd197065a42e7eb77ddb51690ded23bee3 Mon Sep 17 00:00:00 2001 From: Zou Hanya Date: Sun, 19 Nov 2017 12:09:09 +0900 Subject: [PATCH 02/12] Fix timeout condition of erase commands --- src/FLASHIO.cpp | 2 +- src/SPIFlash.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FLASHIO.cpp b/src/FLASHIO.cpp index 5146105..147b5e4 100755 --- a/src/FLASHIO.cpp +++ b/src/FLASHIO.cpp @@ -401,7 +401,7 @@ bool SPIFlash::_notBusy(uint32_t timeout) { } _time++; } while ((micros() - _time) < timeout); - if ((micros() - _time) == timeout) { + if (timeout <= (micros() - _time)) { return false; } return true; diff --git a/src/SPIFlash.cpp b/src/SPIFlash.cpp index 6d5062b..c731188 100755 --- a/src/SPIFlash.cpp +++ b/src/SPIFlash.cpp @@ -730,7 +730,7 @@ bool SPIFlash::eraseSector(uint32_t _addr) { _beginSPI(SECTORERASE); //The address is transferred as a part of this function _endSPI(); - if(!_notBusy(500L)) { + if(!_notBusy(500 * 1000L)) { return false; //Datasheet says erasing a sector takes 400ms max } //_writeDisable(); @@ -753,7 +753,7 @@ bool SPIFlash::eraseBlock32K(uint32_t _addr) { _beginSPI(BLOCK32ERASE); _endSPI(); - if(!_notBusy(1*S)) { + if(!_notBusy(1000 * 1000L)) { return false; //Datasheet says erasing a sector takes 400ms max } _writeDisable(); @@ -777,7 +777,7 @@ bool SPIFlash::eraseBlock64K(uint32_t _addr) { _beginSPI(BLOCK64ERASE); _endSPI(); - if(!_notBusy(1200L)) { + if(!_notBusy(1200 * 1000L)) { return false; //Datasheet says erasing a sector takes 400ms max } #ifdef RUNDIAGNOSTIC From a179306c7a41649ecadce97b7d4ddc534d326ae7 Mon Sep 17 00:00:00 2001 From: Zou Hanya Date: Sun, 19 Nov 2017 12:41:30 +0900 Subject: [PATCH 03/12] Add error check after erase commands in TestFlash.ino --- examples/TestFlash/TestFlash.ino | 93 +++++++++++++++++--------------- 1 file changed, 51 insertions(+), 42 deletions(-) diff --git a/examples/TestFlash/TestFlash.ino b/examples/TestFlash/TestFlash.ino index 1cc0977..03d7859 100755 --- a/examples/TestFlash/TestFlash.ino +++ b/examples/TestFlash/TestFlash.ino @@ -337,22 +337,25 @@ void loop() { } addr = Serial.parseInt(); Serial.println(addr); - flash.eraseSector(addr); - clearprintBuffer(); - sprintf(printBuffer, "A 4KB sector containing address %d has been erased", addr); - Serial.println(printBuffer); - printReadChoice(); - while (!Serial.available()) { - } - uint8_t choice = Serial.parseInt(); - Serial.println(choice); - if (choice == 1) { - printOutputChoice(); + if (flash.eraseSector(addr)) { + clearprintBuffer(); + sprintf(printBuffer, "A 4KB sector containing address %d has been erased", addr); + Serial.println(printBuffer); + printReadChoice(); while (!Serial.available()) { } - uint8_t outputType = Serial.parseInt(); - Serial.println(outputType); - printPage(addr, outputType); + uint8_t choice = Serial.parseInt(); + Serial.println(choice); + if (choice == 1) { + printOutputChoice(); + while (!Serial.available()) { + } + uint8_t outputType = Serial.parseInt(); + Serial.println(outputType); + printPage(addr, outputType); + } + } else { + Serial.println("Erasing sector failed"); } printLine(); printNextCMD(); @@ -368,22 +371,25 @@ void loop() { } addr = Serial.parseInt(); Serial.println(addr); - flash.eraseBlock32K(addr); - clearprintBuffer(); - sprintf(printBuffer, "A 32KB block containing address %d has been erased", addr); - Serial.println(printBuffer); - printReadChoice(); - while (!Serial.available()) { - } - uint8_t choice = Serial.parseInt(); - Serial.println(choice); - if (choice == 1) { - printOutputChoice(); + if (flash.eraseBlock32K(addr)) { + clearprintBuffer(); + sprintf(printBuffer, "A 32KB block containing address %d has been erased", addr); + Serial.println(printBuffer); + printReadChoice(); while (!Serial.available()) { } - uint8_t outputType = Serial.parseInt(); - Serial.println(outputType); - printPage(addr, outputType); + uint8_t choice = Serial.parseInt(); + Serial.println(choice); + if (choice == 1) { + printOutputChoice(); + while (!Serial.available()) { + } + uint8_t outputType = Serial.parseInt(); + Serial.println(outputType); + printPage(addr, outputType); + } + } else { + Serial.println("Erasing block 32K failed"); } printLine(); printNextCMD(); @@ -399,22 +405,25 @@ void loop() { } addr = Serial.parseInt(); Serial.println(addr); - flash.eraseBlock64K(addr); - clearprintBuffer(); - sprintf(printBuffer, "A 64KB block containing address %d has been erased", addr); - Serial.println(printBuffer); - printReadChoice(); - while (!Serial.available()) { - } - uint8_t choice = Serial.parseInt(); - Serial.println(choice); - if (choice == 1) { - printOutputChoice(); + if (flash.eraseBlock64K(addr)) { + clearprintBuffer(); + sprintf(printBuffer, "A 64KB block containing address %d has been erased", addr); + Serial.println(printBuffer); + printReadChoice(); while (!Serial.available()) { } - uint8_t outputType = Serial.parseInt(); - Serial.println(outputType); - printPage(addr, outputType); + uint8_t choice = Serial.parseInt(); + Serial.println(choice); + if (choice == 1) { + printOutputChoice(); + while (!Serial.available()) { + } + uint8_t outputType = Serial.parseInt(); + Serial.println(outputType); + printPage(addr, outputType); + } + } else { + Serial.println("Erasing block 64K failed"); } printLine(); printNextCMD(); From 56772ccb33f562ce4c95b3196895a5008c63e14c Mon Sep 17 00:00:00 2001 From: Prajwal Bhattaram Date: Mon, 20 Nov 2017 10:53:36 +1000 Subject: [PATCH 04/12] Updated information on TestFlash.ino to reflect changes by hanyazou --- examples/TestFlash/TestFlash.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) mode change 100755 => 100644 examples/TestFlash/TestFlash.ino diff --git a/examples/TestFlash/TestFlash.ino b/examples/TestFlash/TestFlash.ino old mode 100755 new mode 100644 index 03d7859..ed4a36b --- a/examples/TestFlash/TestFlash.ino +++ b/examples/TestFlash/TestFlash.ino @@ -1,10 +1,12 @@ /* ---------------------------------------------------------------------------------------------------------------------------------- | Winbond Flash | - | SPIFlash library test v2.4.0 | + | SPIFlash library test v3.0.1 | |----------------------------------------------------------------------------------------------------------------------------------| | Marzogh | | 16.11.2016 | + | Modified: hanyazou | + | 19.11.2017 | |----------------------------------------------------------------------------------------------------------------------------------| | (Please make sure your Serial monitor is set to 'No Line Ending') | | ***************************************************************** | From 6d4fad98c736230a79f1fe83a7693e0b8dc195b1 Mon Sep 17 00:00:00 2001 From: Prajwal Bhattaram Date: Mon, 20 Nov 2017 10:58:14 +1000 Subject: [PATCH 05/12] Updated Changes.log to reflect bugfixes by @hanyazou --- extras/Changes.log | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/extras/Changes.log b/extras/Changes.log index c7ab58a..3addfb7 100755 --- a/extras/Changes.log +++ b/extras/Changes.log @@ -2,11 +2,23 @@ // SPIFlash Library // // Changes log // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// +// Version 3.0.1 // +// Author: Prajwal Bhattaram // +// 09.08.2017 // +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// +Bugs squashed: +**************** +Thanks for catching and fixing the following @hanyazou +--> Added missing break statements in SPIFlash::_beginSPI() because that lacks some essential break statement in switch/case. (commit 1: 1de2c10) +--> The library did not wait until the busy bit in SR1 was cleared. Timeout argument of _notBusy() must be in micro-second. 500L means 500 micro seconds which is too short to wait for completion of erase command. Added " * 1000" to the arguments. (commit 2: 9633c2f) +--> Modified TestFlash.ino to check error of erase commands execution. (commit 3: a179306) +**************** +--> +//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // Version 3.0.0 // // Author: Prajwal Bhattaram // // 09.08.2017 // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// -To check: Bugs Squashed: --> The writeByteArray() & writeCharArray() bug that occurred when writing arrays that spanned page boundaries (squashed in v2.5.0), stayed around to haunt the other functions. Writing any data larger than a single byte that spanned page boundaries would cause the data to wrap around to the beginning of the page. The likelihood of this occurring was slim - no one has reported it to date. However, just in case, this has now been squashed in this release. From afc64157429aacda5c2f9fa6ca94603779583b09 Mon Sep 17 00:00:00 2001 From: Prajwal Bhattaram Date: Mon, 20 Nov 2017 11:01:57 +1000 Subject: [PATCH 06/12] TestFlash.ino now works with SAMD, STM32 and 32U4 --- examples/TestFlash/TestFlash.ino | 5 ++++- examples/TestFlash/command_list.ino | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) mode change 100755 => 100644 examples/TestFlash/command_list.ino diff --git a/examples/TestFlash/TestFlash.ino b/examples/TestFlash/TestFlash.ino index ed4a36b..ff4c51b 100644 --- a/examples/TestFlash/TestFlash.ino +++ b/examples/TestFlash/TestFlash.ino @@ -95,8 +95,11 @@ String inputString, outputString; SPIFlash flash; void setup() { - delay(10); Serial.begin(BAUD_RATE); + #if defined (ARDUINO_ARCH_SAMD) || (__AVR_ATmega32U4__) || defined(ARCH_STM32) + while (!Serial) ; // Wait for Serial monitor to open + #endif + delay(50); //Time to terminal get connected Serial.print(F("Initialising Flash memory")); for (int i = 0; i < 10; ++i) { diff --git a/examples/TestFlash/command_list.ino b/examples/TestFlash/command_list.ino old mode 100755 new mode 100644 index 7ac5e30..823d5e6 --- a/examples/TestFlash/command_list.ino +++ b/examples/TestFlash/command_list.ino @@ -1,7 +1,7 @@ void commandList() { Serial.println(F("-----------------------------------------------------------------------------------------------------------------------------------")); Serial.println(F(" Winbond Flash ")); - Serial.println(F(" SPIFlash library test v2.5.0 ")); + Serial.println(F(" SPIFlash library test v3.0.1 ")); Serial.println(F(" ----------------------------------------------------------------------------------------------------------------------------------")); Serial.println(F(" Marzogh ")); Serial.println(F(" 24.11.2015 ")); From 9d7c1b913f478e753baed964fec8c136a051f257 Mon Sep 17 00:00:00 2001 From: Prajwal Bhattaram Date: Mon, 20 Nov 2017 11:36:37 +1000 Subject: [PATCH 07/12] Changed in case PAGEPROG 0f SPIFlash::_nextBuf() to to prevent issues with destruction of the buffer. Bug caught by @hanyazou ( Issue #102 ) --- src/FLASHIO.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FLASHIO.cpp b/src/FLASHIO.cpp index 147b5e4..12644ed 100755 --- a/src/FLASHIO.cpp +++ b/src/FLASHIO.cpp @@ -271,7 +271,7 @@ void SPIFlash::_nextBuf(uint8_t opcode, uint8_t *data_buffer, uint32_t size) { #ifdef ENABLEZERODMA spi_write(&(*data_buffer), size); #else - _spi->transfer(&(*data_buffer), size); + _spi->transfer(&data_buffer[0], size); #endif #elif defined (ARDUINO_ARCH_AVR) SPI.transfer(&(*data_buffer), size); From 8b0739dce9f08ebf18c204327f170596a5d34de7 Mon Sep 17 00:00:00 2001 From: Marzogh Date: Mon, 20 Nov 2017 14:02:39 +1000 Subject: [PATCH 08/12] Create ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..6065e76 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,47 @@ +Hey there! Thanks for using the SPIFlash library for Arduino. + +**Note: For support questions, please use the [Arduino Forums](http://forum.arduino.cc/index.php?topic=324009.0). This repository's issues are reserved for feature requests and bug reports.** + +**I'm submitting a ...** + - [ ] bug report + - [ ] feature request + - [ ] support request => Please do not submit support request here, see note at the top of this template. + +Do the checklist before filing an issue: + +- [ ] Is this something you can **debug and fix**? Send a pull request! Bug fixes and documentation fixes are welcome. +- [ ] Is this an idea for a feature? Post the feature request as an issue here with a title that clearly says "Feature Request". +- [ ] Is this a bug that you cannot fix? Post the bug report as an issue here with a title that cleary says "Bug Report". + +When opening an issue please include the following details: +------------------------------------------------------------- + +- [ ] Do you want to request a *feature* or report a *bug*? +- [ ] Which library version are you using? +- [ ] Which Arduino IDE version are you compiling the library on? +- [ ] Which OS are you compiling your code on? [Linux / Mac / Windows] +- [ ] Which microcontroller platform are you using? +- [ ] Which Flash memory module are you using? +- [ ] What is the current behavior? +- [ ] What is the expected behavior? + +-------------------------- +###### Bug reports only + +- [ ] If this is a bug report - Provide a **minimal code snippet** example that reproduces the bug. Please make sure you wrap any code in the proper code blocks like below +``` +```CODE HERE``` +``` +- [ ] Provide **screenshots** where appropriate +- [ ] Provide **wiring diagram** where appropriate + +----------------------------- +###### Feature Requests only + +- [ ] If this is a feature request, what is the motivation / use case for changing the behavior? + +---------------------------- + +- [ ] Other information (e.g. detailed explanation, related issues, suggestions how to fix, links for us to have context etc.) + +_Make sure to add **all the information needed to understand the bug/feature** so that someone can help. If the info is missing we'll add the 'Needs more information' label and close the issue until there is enough information._ From fad3453927d6a7b6e74fc33ac3435458338c5fb5 Mon Sep 17 00:00:00 2001 From: Marzogh Date: Mon, 20 Nov 2017 14:07:10 +1000 Subject: [PATCH 09/12] Create PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..eb18044 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,23 @@ +* **Please check if the PR fulfills these requirements** +- [ ] The commit message/s explain/s all the changes clearly +- [ ] Tests for the changes have been added (for bug fixes / features) +- [ ] Docs have been added / updated (for bug fixes / features) + + +* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) + + + +* **What is the current behavior?** (You can also link to an open issue here) + + + +* **What is the new behavior (if this is a feature change)?** + + + +* **Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?) + + + +* **Other information**: From 657ad274cf64e8192679ab8bb4381904b1597fa4 Mon Sep 17 00:00:00 2001 From: Prajwal Bhattaram Date: Thu, 30 Nov 2017 23:41:15 +1000 Subject: [PATCH 10/12] Tested and confirmed support for Spansion S25FL127S --- README.md | 1 + .../FlashDiagnostics/FlashDiagnostics.ino | 29 ++++++++++--------- extras/Changes.log | 5 +++- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9a44e68..f058204 100755 --- a/README.md +++ b/README.md @@ -56,6 +56,7 @@ SPIFlash flash(33); - SST26VF064B - Cypress/Spansion - S25FL116K + - S25FL127S ###### Should work with (Similar enough to the ones actually tested with) - Winbond (All SPI Flash chips) diff --git a/examples/FlashDiagnostics/FlashDiagnostics.ino b/examples/FlashDiagnostics/FlashDiagnostics.ino index a45f13c..b4a3ad0 100644 --- a/examples/FlashDiagnostics/FlashDiagnostics.ino +++ b/examples/FlashDiagnostics/FlashDiagnostics.ino @@ -23,15 +23,15 @@ #endif #if defined (SIMBLEE) - #define BAUD_RATE 250000 - #define RANDPIN 1 +#define BAUD_RATE 250000 +#define RANDPIN 1 #else - #define BAUD_RATE 115200 - #if defined(ARCH_STM32) - #define RANDPIN PA0 - #else - #define RANDPIN A0 - #endif +#define BAUD_RATE 115200 +#if defined(ARCH_STM32) +#define RANDPIN PA0 +#else +#define RANDPIN A0 +#endif #endif #define TRUE 1 @@ -42,9 +42,9 @@ SPIFlash flash; void setup() { Serial.begin(BAUD_RATE); - #if defined (ARDUINO_ARCH_SAMD) || (__AVR_ATmega32U4__) || defined(ARCH_STM32) - while (!Serial) ; // Wait for Serial monitor to open - #endif +#if defined (ARDUINO_ARCH_SAMD) || (__AVR_ATmega32U4__) || defined(ARCH_STM32) + while (!Serial) ; // Wait for Serial monitor to open +#endif delay(50); //Time to terminal get connected Serial.print(F("Initialising Flash memory")); for (uint8_t i = 0; i < 10; ++i) @@ -53,12 +53,15 @@ void setup() { } Serial.println(); randomSeed(analogRead(RANDPIN)); - flash.begin(); + //while (! + flash.begin();/*) { + delay(1000); + }*/ //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 //flash.begin(MB(1)); Serial.println(); Serial.println(); - + getID(); eraseChipTest(); eraseBlock64KTest(); diff --git a/extras/Changes.log b/extras/Changes.log index 3addfb7..399afe1 100755 --- a/extras/Changes.log +++ b/extras/Changes.log @@ -13,7 +13,10 @@ Thanks for catching and fixing the following @hanyazou --> The library did not wait until the busy bit in SR1 was cleared. Timeout argument of _notBusy() must be in micro-second. 500L means 500 micro seconds which is too short to wait for completion of erase command. Added " * 1000" to the arguments. (commit 2: 9633c2f) --> Modified TestFlash.ino to check error of erase commands execution. (commit 3: a179306) **************** ---> +--> + +New flash memory chips supported: +--> S25FL127S //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // Version 3.0.0 // // Author: Prajwal Bhattaram // From 7799639daecd6b4bcb16fc65dd15847cba206893 Mon Sep 17 00:00:00 2001 From: Prajwal Bhattaram Date: Sun, 10 Dec 2017 23:10:33 +1000 Subject: [PATCH 11/12] Fixes #102 --- src/SPIFlash.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/SPIFlash.cpp b/src/SPIFlash.cpp index c731188..c388b6e 100755 --- a/src/SPIFlash.cpp +++ b/src/SPIFlash.cpp @@ -471,7 +471,10 @@ bool SPIFlash::writeByteArray(uint32_t _addr, uint8_t *data_buffer, size_t buffe CHIP_SELECT _nextByte(WRITE, PAGEPROG); _transferAddress(); - _nextBuf(PAGEPROG, &data_buffer[0], bufferSize); + //_nextBuf(PAGEPROG, &data_buffer[0], bufferSize); + for (uint16_t i = 0; i < bufferSize; ++i) { + _nextByte(WRITE, data_buffer[i]); + } CHIP_DESELECT } else { @@ -551,7 +554,10 @@ bool SPIFlash::writeCharArray(uint32_t _addr, char *data_buffer, size_t bufferSi CHIP_SELECT _nextByte(WRITE, PAGEPROG); _transferAddress(); - _nextBuf(PAGEPROG, (uint8_t*) &data_buffer[0], bufferSize); + //_nextBuf(PAGEPROG, (uint8_t*) &data_buffer[0], bufferSize); + for (uint16_t i = 0; i < bufferSize; ++i) { + _nextByte(WRITE, data_buffer[i]); + } CHIP_DESELECT } else { From 64e133a926d984d92934ada6c116b2e871f40e4d Mon Sep 17 00:00:00 2001 From: Prajwal Bhattaram Date: Sun, 10 Dec 2017 23:17:03 +1000 Subject: [PATCH 12/12] Updated change log & library.properties to latest bugfix release v3.0.1 --- extras/Changes.log | 6 +++--- library.properties | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extras/Changes.log b/extras/Changes.log index 399afe1..9a2cd47 100755 --- a/extras/Changes.log +++ b/extras/Changes.log @@ -4,16 +4,16 @@ //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // Version 3.0.1 // // Author: Prajwal Bhattaram // -// 09.08.2017 // +// 10.12.2017 // //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// Bugs squashed: **************** -Thanks for catching and fixing the following @hanyazou +Thanks for catching and fixing the following @hanyazou (PR #101) --> Added missing break statements in SPIFlash::_beginSPI() because that lacks some essential break statement in switch/case. (commit 1: 1de2c10) --> The library did not wait until the busy bit in SR1 was cleared. Timeout argument of _notBusy() must be in micro-second. 500L means 500 micro seconds which is too short to wait for completion of erase command. Added " * 1000" to the arguments. (commit 2: 9633c2f) --> Modified TestFlash.ino to check error of erase commands execution. (commit 3: a179306) **************** ---> +--> Fixes a major bug that was causing input Arrays to be overwritten by zeros during the writeByteArray() / writeCharArray() process. Thanks for catching this @hanyazou. (Issue #102) New flash memory chips supported: --> S25FL127S diff --git a/library.properties b/library.properties index fff047c..9688e9b 100755 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=SPIFlash -version=3.0.0 +version=3.0.1 author=Prajwal Bhattaram maintainer=Prajwal Bhattaram sentence=SPI Flash library for Arduino.