Arduino Library for SPI Flash & FRAM memory chips
SPIMemory

Formerly known as SPIFlash.
Unclaimed project
Are you a maintainer of SPIMemory? Claim this project to take control of your public changelog and roadmap.
Changelog
Arduino library for Flash Memory Chips (SPI based only). Formerly SPIFlash
Formerly known as SPIFlash.
Please report any bugs in issues
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.
| Micro controllers | Dev boards tested with | Notes |
| ----------------- | ---------------------- | ----- |
| ATmega328P | Arduino Uno, Arduino Micro,
Arduino Fio, Arduino Nano | - |
| ATmega32u4 | Arduino Leonardo, Arduino Fio v3 | - |
| ATmega2560 | Arduino Mega | - |
| ATSAMD21G18 (ARM Cortex M0+) | Adafruit Feather M0,
Adafruit Feather M0 Express,
Adafruit ItsyBitsy M0 Express | - |
| AT91SAM3X8E (ARM Cortex M3) | Arduino Due | - |
| nRF52832 (ARM Cortex M4F) | Adafruit nRF52 Feather | - |
| ATSAMD51J19 (ARM Cortex M4) | Adafruit Metro M4 | - |
| STM32F091RCT6 | Nucleo-F091RC | |
| STM32L0 | Nucleo-L031K6 | |
| ESP8266 | Adafruit ESP8266 Feather,
Sparkfun ESP8266 Thing | - |
| ESP32 | Adafruit ESP32 Feather,
Sparkfun ESP32 Thing | Onboard flash memory. Refer to footnote£ below. |
| Simblee | Sparkfun Simblee | - |
£ 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
| Manufacturer | Flash IC | Notes |
| ------------ | -------- | ----- |
| Winbond | W25Q16BV
W25Q64FV
W25Q64JV
W25Q80BV
W25Q256FV | Should work with the W25QXXXBV, W25QXXXFV &
W25QXXXJV families |
| Microchip | SST25VF064C
SST26VF016B
SST26VF032B
SST26VF064B | Should work with the SST25 & SST26 families |
| Cypress/Spansion | S25FL032P
S25FL116K
S25FL127S | Should work with the S25FL family |
| ON Semiconductor | LE25U40CMC | |
| AMIC| A25L512A0 | |
| Micron| M25P40 | |
| Adesto| AT25SF041 | |
| Macronix| MX25L4005
MX25L4005 | |
| Giga devices| GD25Q16C | (Used on the Adafruit ItsyBitsy M0 Express) |
| Manufacturer | Flash IC | Notes | | ------------ | -------- | ----- | | Cypress/Spansion | FM25W256 | Should work with the FM25W family |
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 #113
NOCHIPSELECTDECLARED for errors with declaring custom SPI pins.setClock() works and allows for the definition of clock speed before the SPI Bus is instantiated. Refer to wiki for further details. Thanks @rambo.