PKP
VS1000 P
ROGRAMMER
’
S
G
UIDE
VSMPG
17.5
VS1000 ROM code usage
The ROM code in VS1000 has the following usage for the Nand Flash controller:
At boot-up the Nand Flash chip select is checked: if it is pulled high, Nand flash scan
is attempted. NFCE is configured as a GPIO pin and asserted/deasserted in software.
Nand flash boot scan is performed using 660 ns read/write low time for access (27 wait-
states, CLKI = 3.5x).
A number of access methods are used to attempt to read the first 512 bytes of the Nand
Flash chip and look for an 8-byte NandType record from the beginning of the block.
A string "VLSI" must be found from the beginning of the block to recognize a proper
NandType record.
The NandType record sets the proper access method for the Flash in question (small or
large page, number of address bytes) and specifies the device size and erasable block
size of the Flash chip (see datasheet).
A valid nand flash identification record also contains a setting for access time in nanosec-
onds. New waitstate setting is calculated from this value and the active internal clock for
each subsequent access.
The remaining 504 bytes of the first block and a specified number of additional sectors
(upto total of 16 sectors, i.e. 8192 bytes) can contain VS1000 boot code, which can
be used to load data to X data RAM, Y data RAM, or instruction RAM and optionally
execute code to extend or replace firmware functionality on chip.
If the FLASH type is not supported by the ROM firmware, but reading of at least the first
block is successful with one of the ROM read methods, the boot record can replace the
read method to continue boot.
17.5.1
Nand Flash access methodology
VS1000 writes to the nand flash in blocks of 512 (data) + 16 (spare) bytes. single-level
cell (SLC) large page flashes (block size 2112) are mostly ok with this, but multi-level cell
(MLC) have problems with this so those are not supported by the ROM code. VS1000
ROM contains own wear levelling algorithm and logical-to-physical block mapper that
greatly extends the life of the nand flash chips.
MLC memories and larger than 2 kB page sizes can be supported with custom boot
code, as long as at least the first 512-byte sector can be successfully read using the
ROM boot method. The application in question determines how feasible this is.
Rev. 0.20
2011-10-04
Page