There is a newer version of the record available.

Published April 20, 2019 | Version v3.3.0
Software Open

Marzogh/SPIMemory: Arduino Library for SPI Flash & FRAM memory chips

Description

SPIMemory <hr>

Formerly known as SPIFlash.

<hr>

<hr>

Please report any bugs in issues

<hr> Arduino library for Flash & FRAM Memory Chips (SPI based only)

<sup> Download the latest stable release from [here](https://github.com/Marzogh/SPIMemory/releases/latest). Please report any bugs in [issues](https://github.com/Marzogh/SPIMemory/issues/new).</sup>

This Arduino library is for use with flash and FRAM memory chips that communicate using the SPI protocol. In its current form it supports identifying the flash/FRAM chip and its various features; automatic address allocation and management; writing and reading a number of different types of data, ranging from 8-bit to 32-bit (signed and unsigned) values, floats, Strings, arrays of bytes/chars and structs to and from various locations; sector, block and chip erase; and powering down for low power operation.

<hr> IDE Compatibility (actually tested with)
  • Arduino IDE v1.5.x
  • Arduino IDE v1.6.x
  • Arduino IDE v1.8.x
<hr> Platform compatibility Micro controllers Dev boards tested with Notes ATmega328P Arduino Uno, Arduino Micro, <br> Arduino Fio, Arduino Nano - ATmega32u4 Arduino Leonardo, Arduino Fio v3 - ATmega2560 Arduino Mega - ATSAMD21G18 (ARM Cortex M0+) Adafruit Feather M0, <br> Adafruit Feather M0 Express, <br> Adafruit ItsyBitsy M0 Express - AT91SAM3X8E (ARM Cortex M3) Arduino Due - ATSAMD51J19 (ARM Cortex M4) Adafruit Metro M4 - STM32F091RCT6 Nucleo-F091RC ESP8266 Adafruit ESP8266 Feather, <br> Sparkfun ESP8266 Thing - ESP32 Adafruit ESP32 Feather, <br> Sparkfun ESP32 Thing Onboard flash memory. Refer to footnote<sup>£</sup> below. Simblee Sparkfun Simblee -

<sup>£ </sup><sub> ESP32 boards usually have an SPI Flash already attached to their default SS pin, so the user has to explicitly declare the `ChipSelect` pin being used with the constructor</sub>

<hr> Flash memory compatibility - Actually tested with Manufacturer Flash IC Notes Winbond W25Q16BV <br> W25Q64FV <br> W25Q64JV <br> W25Q80BV <br> W25Q256FV Should work with the W25QXXXBV, W25QXXXFV & <br> W25QXXXJV families Microchip SST25VF064C <br> SST26VF016B <br> SST26VF032B <br> SST26VF064B Should work with the SST25 & SST26 families Cypress/Spansion S25FL032P <br> S25FL116K <br> S25FL127S Should work with the S25FL family ON Semiconductor LE25U40CMC AMIC A25L512A0 Micron M25P40 Adesto AT25SF041 Giga devices GD25Q16C (Used on the Adafruit ItsyBitsy M0 Express) Should work with any flash memory that is compatible with the SFDP standard as defined in JESD216B <hr> FRAM memory compatibility - Actually tested with Manufacturer Flash IC Notes Cypress/Spansion FM25W256 Should work with the FM25W family <hr> Installation Option 1
  • Open the Arduino IDE.
  • Go to Sketch > Include Library > Manage libraries.
  • Search for SPIMemory.
  • Install the latest version.
Option 2
  • Click on the 'Clone or download' button above the list of files on this <a href = "https://github.com/Marzogh/SPIMemory/tree/master"> page </a>.
  • Select Download ZIP. A .zip file will download to your computer.
  • Unzip the archive and rename resulting folder to 'SPIMemory'
  • Move the folder to your libraries folder (~/sketches/libraries)
<hr> Change log v3.3.0 Enhancements & Optimizations:
  • Reduce SRAM footprint when running Diagnostics.ino. Thanks @rambo (PR #157)
  • Officially supports the ESP32 (tested on the ESP32 Feather)
  • Now supports FRAM memory chips via the SPIFram constructor
  • Changed Diagnostics output in _chipID() to match situation better.
  • Fixed _chipID() to run more efficiently.
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)
  • @incorvia fixed 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.
  • Fixed 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.
New flash memory chips supported:

--> GD25Q16C from Giga devices (Used on the Adafruit ItsyBitsy M0 Express) --> W25Q64JV from Winbond --> SST26VF016B & SST26VF032B from Microchip. (Thanks @mix86)

New FRAM memory chips supported:

--> FM25W256 from Cypress

Files

Marzogh/SPIMemory-v3.3.0.zip

Files (3.3 MB)

Name Size Download all
md5:d3811bd0d979c3fd1b49f95656e7464a
3.3 MB Preview Download

Additional details

Related works