Use of flash memory for series 3100 chips – Echelon Neuron C User Manual

Page 197

Advertising
background image

Neuron C Programmer’s Guide

185

Use of Flash Memory for Series 3100 Chips

For the Neuron 3150 Chip and the FT 3150 Smart Transceiver, Neuron firmware

version 6 and later supports the use of flash memory. The firmware supports
only the following flash parts:

• Atmel

®

AT29C256

• Atmel AT29C257 (32Kx8, 64 byte sector size)
• Atmel AT29C512 (64Kx8, 128 byte sector size)
• Atmel AT29C010 (128K x 8, 128 byte sector size)

Neuron 3150 Chips and FT 3150 Smart Transceivers that use these flash
memory parts must run at 1.25 MHz clock speed, or faster.
You can use flash memory for just the EEPROM memory region, or for both the

ROM and EEPROM memory regions. When you use flash memory for the
EEPROM memory region, it can contain all memory areas normally associated

with EEPROM, that is, EECODE and EEFAR. Flash memory can only be

modified reliably a limited number of times (typically, 1000 to 10,000 times, but
varies depending on the chip – consult the chip manufacturer's data books for

specific limitations). Thus, even though the compiler, linker, and firmware

support placing eeprom class variables in flash memory, you must take care that
these variables are modified infrequently, within the specified lifetime of the

flash memory parts.
When you also use flash memory for the Neuron firmware ROM, the ROMCODE
area’s size is fixed at the size of the system image (16 KB or more) and therefore

cannot contain application code or data. The remainder of the flash memory
address space is divided between EECODE and EEFAR. However, the flash

memory should not contain both the system image and application read/write

data, because when the flash is being written to, the system image cannot be
read during the chip's programming interval (<10 msec). The Neuron firmware

automatically locks itself out of the flash memory during the programming

interval, but this lockout causes all system functions to be delayed, thus network
messages can be lost during the lockout interval. If you must place data in flash

memory, you can use the offchip keyword to direct the variables that are the least

likely to be modified into flash memory.

Because flash memory is written on a sector basis (either 64, 128, or 256 bytes

depending on the part), the number of writes possible for an eeprom variable

located in flash is a function of the number of writes to the sector where it
resides. As a comparison, consider a one-byte eeprom variable located in an off-

chip EEPROM supporting 1,000 writes. This variable can be safely updated
1,000 times. If that same variable resided in an off-chip flash memory part with

64 byte sectors and a similar write limit, then the number of writes must be

stated as a function of all the data in that sector. Specifically, up to 1,000 writes
could be done for all the variables in the sector. Given 64 one-byte variables with

equal frequency of modification, each could be written 1,000/64 or about 15 times.
Because modification of data in flash memory requires a flash programming
cycle, the Neuron C linker uses an alternate linking algorithm, placing all data

objects in on-chip memory if it can. You can control which objects are placed off-

chip, if some must be, by use of the offchip keyword in the data object’s
declaration. If the linker places any data in flash memory, a warning is given to

this effect.

Advertising