P2 Edge 16 MB Flash Reader and Explorer Utility

Share on facebook
Share on twitter
Share on linkedin
Share on email
Share on print
Table of Contents

The P2 Edge (#P2-EC) has a 16MB Flash memory (Winbond part W25Q128JV) with a Serial Peripheral Interface (SPI) to the Propeller 2. The first 512K bytes is used for the user’s bootable application and the remaining ~15.5MB may be used for data. The timing with the SPI Flash is fast and deterministic, unlike SD cards.

This Quick Byte is supported by a “Spin2 for Beginners” video from JonnyMac, linked below under Additional Resources.

Three example programs demonstrate reading the contents of the 16MB Flash:

  • 02a_jm_flash_reader-Archive (Spin2)
  • 02b_jm_flash_reader-Archive (PASM)
  • 02c_jm_flash_reader-Archive (smart pins)
The 16MB Flash array is organized into 65,536 programmable pages of 256 bytes each. Up to 256 bytes can be programmed at a time. Pages can be erased in blocks of 16 (4KB) or 256 (64KB). Flash blocks must be erased before they can be programmed.
Load any of the reader programs to the P2 Edge’s Flash and open Parallax Serial Terminal. Each Flash has an internal 64-bit serial number which may be used to identify products designed with the P2 Edge Module.

The Flash Explorer program (03_jm_flash_explorer-Archive) can write to the Flash starting at $10_0000. This code example has no write-leveling to spread the erase/write cycles across all blocks. Erasure resets bytes to FF. Modifications can be made on this program as desired, but be aware of the ability to overwrite the bootable application in the first 512KB.

Programming Language
Tools and Operating System
Document Author
Source Code Author
Table of Contents
5 1 vote
Article Rating
Notify of
Inline Feedbacks
View all comments
Copyright © 2021 Parallax Inc. All Rights Reserved
Designed and Made in California, USA