Memory; Flash - Metrologic Optimus S Programming Manual

"c" programming guide
Table of Contents

Advertisement

3.15 Memory

This section describes the commands related to the flash memory and SRAM, where the
Program Manager and File System reside respectively.
The terminal has 1 MB flash memory for program storage and up to 4 MB SRAM for data
storage. However, the flash memory also serves to store crucial user data, such as the
application settings. One memory bank with specific address 0xF60000 ~ 0xF6FFFF is
reserved for this purpose.

3.15.1 Flash

The 1 MB flash memory is divided into 16 memory banks, and each bank is 64 KB.
The kernel itself takes 2 banks, and the system reserves 1 bank (0xF60000 ~ 0xF6FFFF) for
data storage, such as the application settings. The rest banks are available for storing user
programs as well as font files.
Because the flash memory is non-volatile, it needs to be erased before writing to the same
bank, 0xF60000 ~ 0xF6FFFF. This memory bank is further divided into 256 records,
numbering from 1 ~ 256 and each with length limited to 255 bytes.
Note: The flash memory can only be erased on a bank basis, that is, all the records stored
in 0xF60000 ~ 0xF6FFFF will be gone.
EraseSector
Purpose
To erase a whole sector of flash memory.
Syntax
int EraseSector (void *sector_start_addr);
EraseSector (0xF60000);
Example
Description
This routine erases the flash memory before calling WriteFlash to write data to
the flash memory.
Return
If successful, it returns 1.
Otherwise, it returns 0.
See Also
WriteFlash
Chapter 3 Terminal Specific Function Library
211

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents