70
SBC BL2600
4.4.6 SRAM Use
The BL2600 model and some memory variations described in Section 1.2.2 have a battery-
backed data SRAM and a program-execution SRAM. Dynamic C provides the
pro-
tected
keyword to identify variables that are to be placed into the battery-backed
SRAM. The compiler generates code that maintains two copies of each protected variable
in the battery-backed SRAM. The compiler also generates a flag to indicate which copy of
the protected variable is valid at the current time. This flag is also stored in the battery-
backed SRAM. When a protected variable is updated, the “inactive” copy is modified, and
is made “active” only when the update is 100% complete. This assures the integrity of the
data in case a reset or a power failure occurs during the update process. At power-on the
application program uses the active copy of the variable pointed to by its associated flag.
The sample code below shows how a protected variable is defined and how its value can
be restored.
protected nf_device nandFlash;
int main() {
...
_sysIsSoftReset(); // restore any protected variables
The
bbram
keyword may also be used instead if there is a need to store a variable in bat-
tery-backed SRAM without affecting the performance of the application program. Data
integrity is
not
assured when a reset or power failure occurs during the update process.
Additional information on
bbram
and
protected
variables is available in the
Dynamic C
User’s Manual
.
4.4.7 NAND Flash Drivers
The Dynamic C
NANDFlash\NFLASH.LIB
library is used to interface to NAND flash
memory devices on the RCM3365 and the RCM3375. The function calls were written spe-
cifically to work with industry-standard flash devices with a 528-byte page program and
16896-byte block erase size. The NAND flash function calls are designed to be closely
cross-compatible with the newer serial flash function calls found in the
SFLASH.LIB
library. These function calls use an
nf_device
structure as a handle for a specific NAND
flash device. This allows multiple NAND flash devices to be used by an application.
More information on these function calls is available in the
Dynamic C Function Refer-
ence Manual
.
Содержание BL2600
Страница 1: ...SBC BL2600 C Programmable Single Board Computer with Ethernet User s Manual 019 0142_L...
Страница 6: ...SBC BL2600...
Страница 14: ...8 SBC BL2600...
Страница 96: ...90 SBC BL2600...
Страница 112: ...106 SBC BL2600...
Страница 116: ...110 SBC BL2600...