3. Memory

The Stamp9G20 is equipped with 32-Bit CPU-bus. Only a 16-Bit bus is exported on the interface connectors of the Stamp9G20. The memory bus voltage is 1.8 V and runs at 132 MHz. The memory bus voltage is different from normal operating voltage, which is 3.3 V. This has to be considered, when designing additional peripherals connected to the memory bus. Eventually buffer chips are necessary.

3.1. NAND Flash

The Stamp9G20 is equipped with a 128 MB NAND flash with 100000 erase and write cycles.It is organized in 128KB blocks. Customer specific adaptations are possible up to 512 MB on-board NAND flash. It is connected to chip select three (NCS3) of the microcontroller.

NAND flash has a different organisation of transistors than the commonly used NOR flash. While it allows a much higher density and thus an increase in storage capacity, there are some differences which need to be kept in mind.

Typically, NAND flash is organized in pages and blocks, similar to hard disks. Pages are 512, 2048 or 4096 bytes in size, typical block sizes are 16, 128, 256 or 512 KB. Reading and programming are performed on a page basis. Programming can only be done sequently in one block.

Additionally, NAND flash requires bad block management, either by the driver software or by a separate controller chip. Most NAND devices are shipped with bad blocks. These are identified and marked according to a specified bad block strategy. Further bad blocks may be detected during runtime. They are detected via an ECC (error correcting code). If a bad block is detected, the data is written to a different, good block, and the bad block table is updated. So the overall memory capacity gradually shrinks as more and more blocks are marked bad.

This error detection is done by software like U-boot and Linux. Additionally, NAND flash is subject to a limited number of write and erase cycles. These are typically 100.000 cycles per block. So it is highly recomended to use wear levelling filesystems.

3.2. SDRAM

The Stamp9G20 is equipped with 64MB SDRAM. Customer specific adaptations allow configurations up to 128MB. The SDRAM is connected to chip select one (NCS1) of the micrcontroller.

SDRAM is volatile memory which allows random access to any location of its memory area. SDRAM has a synchronous interface. This means that it waits for a clock signal before responding to its control inputs, therefore it is synchronized with the CPU bus. The clock is used to drive a finite state machine in the chip, which allows to accept new instructions, before the previous one has finished executing.

3.3. EEPROM

The Stamp9G20 is equipped with a 128 bytes EEPROM, connected to the Dallas™ 1 wire bus.

EEPROM stands for Electrically Erasable Programmable Read-Only Memory and is non-volatile memory, which is used to store small amounts of data like calibration or configuration data. EEPROMS are byte-wise erasable, thus allowing true random access.

3.4. SRAM

The Stamp9G20's microcontroller is equipped with 2 x 16 KB internal SRAM. The internal SRAM can be accessed in one bus cycle and may be used for time critical sections of code or interrupt handlers.

3.5. DataFlash

The Stamp9G20 can optionally be equipped with DataFlash™.

DataFlash is a Atmel® proprietary interface and is compatible to the SPI standard. Similar to other flash chips it can be addressed page orientated and is available in sizes up to 8MB. Furthermore it is a possible boot media for the microcontroller.