![Digi S6B User Manual Download Page 79](http://html.mh-extra.com/html/digi/s6b/s6b_user-manual_2496668079.webp)
General Purpose Flash Memory
General Purpose Flash Memory
XBee Wi-Fi RF Module User Guide
79
General Purpose Flash Memory
XBee Wi-Fi RF Modules provide 160 4096-byte blocks of flash memory that an application can read and
write to. This memory provides a non-volatile data storage area that an application uses for many
purposes. Some common uses of this data storage include:
n
Storing logged sensor data
n
Buffering firmware update data for a host microcontroller
n
Storing and retrieving data tables needed for calculations performed by a host microcontroller
The General Purpose Memory (GPM) is also used to store a firmware update file for over-the-air
firmware updates of the device itself.
Work with flash memory
When working with the General Purpose Memory, observe the following limitations:
n
Flash memory write operations are only capable of changing binary 1s to binary 0s. Only the
erase operation can change binary 0s to binary 1s. For this reason, you should erase a flash
block before performing a write operation.
n
When performing an erase operation, you must erase the entire flash memory block—you
cannot erase parts of a flash memory block.
n
Flash memory has a limited lifetime. The flash memory on which the GPM is based is rated at
20,000 erase cycles before failure. Take care to ensure that the frequency of erase/write
operations allows for the desired product lifetime. Digi's warranty does not cover products that
have exceeded the allowed number of erase cycles.
n
Over-the-air firmware upgrades erase the entire GPM. Any user data stored in the GPM will be
lost during an over-the-air upgrade.
Access General Purpose Flash Memory
The GPM of a target node can be accessed from the XBee Wi-Fi RF Module's serial port or from a non-
XBee network client.
To access the GPM of a target node locally or over-the-air, send commands to the MEMORY_ACCESS
cluster ID (0x23) on the DIGI_DEVICE endpoint (0xE6) of the target node using explicit API frames.
Explicit API frames have frame identifier 0x11. For a description of Explicit API frames, see
Access from a non-XBee network client is performed by sending UDP frames to the target node on
port 0x0BEE. The payload begins with an application header followed by the GPM header described
below. See
to learn how to format the application header.
Use the following header to generate a GPM command. Use it whether you use serial port access or
network client access. For network client access, an application header needs to precede the GPM
header. This section describes the perspective of serial port access, without the application header.
Do not forget to precede each frame with an application header if you use a network client for GPM
access.