- The SPIMemory now supports SPI FRAM (one chip for now, but the list is going to grow. )

Bugs squashed:- Fixed a major bug causing issues with page boundaries in writeAnything and writeStr. Thanks for your help @jacky4566 (Issue #151)- Fixed a major bug with reading Strings (Issue #143)- Fixes a bug by initialising the SPIBusState to false- Fixes bug that causes ballooning of pagesize when SFDP is not read. This is because no default _pageSize value was set in this scenario. This has now been fixed.- Fixes a major bug in how SFDP data is used to calculate chip capacity. The previous version of the library returned a wrong value. This has now been fixed. Refer to comments in _getSFDPFlashParam(void) for further details.

@Srmojo & @timoteo_mendes: I've just tested the latest version of the library - v3.3.0 - with the W25Q64JV on the Adafruit 328p feather and it works fine. I do not have an Adalogger handy, but AFAIK, the both of them use the same µC - hope it helps!

@amirezz: There was a bug in v3.2.1 that prevented the library from writing to the SST25 and SST26 series. This has been fixed in v3.3.0. Also, the library supports the LE25U40C.

@zhliao: Could you check and confirm that v3.3.0 also causes the same issue? If it does, please let me know and I will take a look at it right away.

Marzogh you can probably update the compatibility tables. I haven't thoughly tested but it does seem to work just fine with Teensy 3.2 and Teensy LC. I am also using the Adesto AT25SL641. Which won't be very popular at 1.8v but it passed all checks with the LC and works perfectly.

I have been able to run the FlashDiagnostics on the Sparkfun RedBoard Turbo. A M0 processor with W25Q32BV 32M-Bit Winbond memory chip. I had to modify the variant.h and variant.cpp files as Sparkfun had omitted to include Arduino access for the on board SPImemory.

I have posted details of the edits and a copy of the output obtained on the Sparkfun forum:

Bugs squashed:- FastRead works properly now. All previous versions of the library has a FastRead bug that prevent it from doing what it was supposed to.

Enhancements:

-An alternate version of the constructor SPIFlash flash(int8_t *SPIPinsArray); can be used (only with ESP32 boards as of now) to enable the use of custom SPI pins. SPIPinsArray has to be a 4 element array containing the custom SPI pin numbers (as signed integers - int8_t) in the following order - sck, miso, mosi, ss. Refer to the wiki for more information. Resolves issue #113- Created new error code `NOCHIPSELECTDECLARED` for errors with declaring custom SPI pins.- Using other SPI ports (HSPI, VSPI, SPI1, SPI2 etc.) is now also supported on ESP32 boards - along with SAMD and STM32 boards (supported since v3.0.0). Resolves issue #177- The new version changes the way setClock() works and allows for the definition of clock speed before the SPI Bus is instantiated. Refer to wiki for further details. Thanks @rambo.(PR #156)

Hi ThereI'm in the process of designing a shield for an Arduino Due. and unfortunately after all our PCBs have been manufactured I was shocked to find the Due has no EEPROM (I only need 90 bytes). Thats fine I thought, we have plenty of SPI flash chips in the factory I can use.... only to notice the "4" SPI units the Due is supposed to have. One is connected to a silly header with 5V (instead of 3.3). I have to get my SPI working over some pins that are actually on the regular pins. and I found the second SPI is only on the BGA version of the micro.So I asked what about the other 2? Does your library support using the USARTs in SPI mod? and if so how?

I didn't manage to make this library work on a NodeMCU v1.0 board, it uses an ESP12 (ESP8266 + 32Mbit Flash)). I don't understand as it's supposed to work with an Adafruit Feather HUZZAH board which is uses an ESP12 too.I'm using the TestFlash example to test.First I have to force the SPI to SPI_PINS_HSPI_OVERLAP mode, otherwise I get a watchdog reset.Why is the SPI frequency set to 104 Mhz by default ? The Winbond-W25Q32 chip is not supposed to work above 80 MHz and the SPI library uses 40 Mhz...The CS signal set to pin GPIO15 for the ARDUINO_ARCH_ESP8266, which is correct for user SPI, but on an ESP12 the SPI0 must be used (SPI_PINS_HSPI_OVERLAP mode), which has CS on GPIO11. When I try to change CS to 11 I get a watchdog reset.I tried to access the flash directly without your library by trying to read Jedec ID, I can get all the signals correct (I think) except the SDIO_DATA3 (GPIO10) signal which is kept low, thus disabling the flash (this signal is connected to HOLD pin on the flash chip.I compared to the signals I have when I call the SDK function spi_flash_get_id() (which works). If I try to force the SDIO_DATA3 (GPIO10) signal high in the code, I get a watchdog reset.I've tried to post on the Espressif forum to ask for help, but after a few days my message has still not been validated by moderator...

Hi ThereI'm in the process of designing a shield for an Arduino Due. and unfortunately after all our PCBs have been manufactured I was shocked to find the Due has no EEPROM (I only need 90 bytes). Thats fine I thought, we have plenty of SPI flash chips in the factory I can use.... only to notice the "4" SPI units the Due is supposed to have. One is connected to a silly header with 5V (instead of 3.3). I have to get my SPI working over some pins that are actually on the regular pins. and I found the second SPI is only on the BGA version of the micro.So I asked what about the other 2? Does your library support using the USARTs in SPI mod? and if so how?

Hi Cheetor, The short answer is, I'm afraid not. Sorry. The latest version (3.4.0) does let you switch between existing SPI interfaces, so perhaps that might be helpful.