PKP
VS1000 P
ROGRAMMER
’
S
G
UIDE
VSMPG
9
Booting from NAND FLASH
If a nand flash chip is connected to the byte-wide bus interface of VS1000, it can
also be used for booting the VS1000. VS1000 supports natively most single-level cell,
single-chip-select NAND flashes such as the NAND128W3A2 from ST (small page) or
K9F2G08U0M from Samsung (large page).
With custom code (see MLCPlayer example from VS1000 software page) VS1000 can
also support various multi-level cell (MLC) memories with 2 kB block size. Larger page
sizes can be supported in special applications.
9.1
Nand Flash startup sequence and structure
The nand flash boot is attempted after EEPROM boot. First the I/O voltages are set
according to the input state of GPIO0[7] pin. If SPI memory is not available, VS1000
attempts to read the first block of 512 bytes of the nand flash with 8 different access
methods, using the nand flash interface with only CS1 chip select. The access methods
cover small and large page flashes with 4, 5 or 6 address bytes.
Because different types of nand flash chips differ in the access methodology, using a
nand flash is somewhat more complicated than using an eeprom. To ensure proper
operation, a nand flash chip must be programmed with a valid VLSI ID record in the
beginning of block 0. VS1000 looks for the ID record and adjusts the nand access
parameters according to the ID record information.
If the VLSI boot id ’V”L”S”I’ (0x564C5349) is successfully read in the beginning of block
0, the ID record is considered valid. The next words of the ID record specify the overall
size, erasable block size, number of address bytes, block size and speed grade of the
nand flash chip in question in the format specified in the VS1000 datasheet.
The rest of the 512-byte block contain the start of the user boot code and the number of
extra sectors to load.
The first erasable block of a nand flash chip is reserved for boot data. The filesystem
that contains the songs to be played and is visible to the PC as a USB disk starts at a
further offset after the boot area and for security reasons is separate from the boot area.
ID
User application code (max 8176 bytes)
Application can take 15 extra sectors
First 512 bytes contain ID, start of the application and
the number of extra sectors to load
Figure 5: Structure of the beginning of a Nand Flash in VS1000B
Rev. 0.20
2011-10-04
Page