Skip to content

Arduino Library for Winbond Flash Memory Chips

Compare
Choose a tag to compare
@Marzogh Marzogh released this 02 Aug 14:08
· 293 commits to master since this release

SPIFlash Build Status DOI

GitHub release
GitHub commits
GitHub issues
GitHub pull requests
license

Please report any bugs in issues.

This Arduino library is for use with Winbond serial flash memory chips. In its current form it supports identifying the flash chip and its various features; automatic address allocation and management; reading and writing bytes/chars/ints/longs/floats/Strings from and to various locations; reading and writing pages of bytes; continous reading/writing of data from/to arrays of bytes/chars; sector, block and chip erase; and powering down for low power operation.

  • For details of the Winbond Flash chips compatible with this library please refer to the Excel spreadsheet in the Extras folder.

Compatibility

Arduino IDEs supported (actually tested with)
  • IDE v1.5.x
  • IDE v1.6.0-v1.6.5
  • IDE v1.6.9-v1.6.12
  • IDE v1.8.2
Boards
Completely supported
  • Arduino Uno
  • Arduino Leonardo
  • Arduino Due
  • Arduino Zero
  • ESP8266 Boards (On the Arduino IDE)
  • Simblee Boards (On the Arduino IDE)
  • RTL8195A (tested and enabled by @boseji on 02.03.17)
  • Arduino Mega
  • Arduino Micro
  • Arduino Fio
In BETA
  • ESP32 Boards (Tested on the Adafruit Esp32 Feather) The library is known to work with the ESP32 core as of the current commit 9618eec on 02.08.2017.
    NOTE: ESP32 boards usually have an SPIFlash already attached to their SS pin, so the user has to declare the ChipSelect pin being used when the constructor is declared - for example
SPIFlash flash(33);

ESP32 support will remain in beta till the ESP32 core can be installed via the Arduino boards manager.

Flash chips
  • Winbond
    • W25X05CL (64K-Byte)
    • W25X10BV (128K-Byte)
    • W25X20BV (256K-Byte)
    • W25X40BV (512K-Byte)
    • W25Q80BV (1M-Byte)
    • W25Q16BV (2M-Byte)
    • W25Q32BV (4M-Byte)
    • W25Q64BV (8M-Byte)
    • W25Q128BV (16M-Byte)
    • W25Q256FV (32M-Byte)
  • Other Winbond flash chips can be used by declaring their size in bits as an argument in begin()

Installation

Option 1
  • Open the Arduino IDE.
  • Go to Sketch > Include Library > Manage libraries.
  • Search for SPIFlash.
  • Install the latest version.
Option 2
  • Click on the 'Download zip' below.
  • Unzip the archive and rename resulting folder to 'SPIFlash'
  • Move the folder to your libraries folder (~/sketches/libraries)

Change log

v2.7.0

Bugs Squashed:
  • ATTiny85 support available again.
New Boards supported
  • Arduino Zero now fully supported.
Enhancements & Optimizations:
  • Updated to be compatible with the ESP32 core for Arduino as of the current commit 9618eec on 02.08.2017. For some unknown reason, SPI clock speeds higher than board speed/4 are not stable and so, the clock speed for ESP32 dev boards has currently been throttled to 20MHz.
    NOTE: ESP32 boards usually have an SPIFlash already attached to their SS pin, so the user has to declare the ChipSelect pin being used when the constructor is declared - for example
SPIFlash flash(33);