External Memory Organization

The Flash 2 Click is used as the external memory module for this application. The Flash memory module used on this Click Boardâ„¢ is the SST26VF064B, a 64 Mbit serial Flash memory from Microchip Technology. SST26VF064B contains 67,108,864 bits organized in units of 8 bits, which gives 8,388,608 bytes of data memory. This memory module contains 2048 sectors of 4 KB each. Furthermore, the memory is organized in pages. One page holds 256 bytes and there are 32,768 pages (32,768 pages x 256 bytes = 8,388,608 bytes total). The SST26VF064B module communicates to the microcontroller via SPI interface.
Figure 1. Flash 2 Click (Image Courtesy of MikroElektronika)

The SST26VF064B can be written one page at a time. The Page Program instruction allows up to 256 bytes to be written during one write cycle. Data can be read by the Read Data Bytes instruction. While reading, the address increment is automatically executed, making it possible to read the entire memory by a single Read Data command. The Page Program instruction can only reset the bits to 0. Therefore, a segment of memory needs to be erased prior to programming or, in this case, filled with 1s (0xFF). The SST26VF064B allows erasing one sector at a time (Sector Erase instruction), one block at a time (Block Erase instruction) and the entire memory (using the Chip Erase instruction).

See Data Transfer from Ping-Pong Buffers to External Memory and Data Transfer from External Memory to DAC for details on how to write to and read from the external memory.