VS1000
7
FIRMWARE OPERATION
7.2 NAND FLASH Probe
If NAND FLASH chip select (NFCE) is high, a NAND FLASH is assumed to be present and the
first sector is read. The access methods (nandTypes 0..5) are tried in order to find the “VLSI”
identification. If the first bytes are “VLSI”, a valid boot sector is assumed. This sector gives the
necessary information about the NAND FLASH so that it can be accessed in the right way.
Byte
Value
Description
0,1,2,3
4,5
6
7
8,9
0x56 0x4c 0x53 0x49 ’V’ ’L’ ’S’ ’I’ – Identification
0x00 0x03
0x08
nandType (0x0003 = large-page with 3-byte block address)
blockSizeBits (28 ∗ 512 = 128 KiB per block)
0x13
flashSizeBits (219 ∗ 512 = 256 MiB flash)
0x00 0x46
0x00 0x01
nandWaitNs – NAND FLASH access time in ns
number of extra blocks for boot (example: 0x0001)
10,11
12,13,14,15 0x42 0x6f 0x4f 0x74
16...511
’B’ ’o’ ’O’ ’t’ – Optional boot ident
code
NandType Description
0
1
2
3
4
5
512+16 B small-page flash with 2-byte block address (<= 32 MB)
2048+64 B large-page flash with 2-byte block address (<= 128 MB)
512+16 B small-page flash with 3-byte block address (> 32 MB <= 8 GB)
2048+64 B large-page flash with 3-byte block address (> 128 MB <= 32 GB)
512+16 B small-page flash with 4-byte block address (> 8 GB)
2048+64 B large-page flash with 4-byte block address (> 32 GB)
If bytes 12-15 contain “BoOt”, the value in bytes 10 and 11 determines how many sectors are
read from NAND-flash. Value 1 means two 512-byte sectors are read, value 0 means only
the first block is needed. After the data is read into memory, the boot records in this data are
processed, transferring code and data sections into the right places in memory and possibly
executed. If an unknown boot record is encountered, the booting is stopped and control returns
to the firmware code.
Word Description
0
type 0x8000=I-mem 0x8001=X-mem 0x8002=Y-mem 0x8003=execute
1
data length in words -1 – 0 = 1 word, 1 = 2 words, etc.
2
3..
address – record address
data
Note: In VS1000a you can not have Y-memory records.
Note: In VS1000b/c/d you need one filler word after each Y-memory record.
If NFCE is low during boot, or an uninitialized NAND FLASH is connected, the NAND FLASH
type is set to 0xffff, and a RAM disk is initialized when USB is attached. In this mode you
can drop a boot file named
into the disk and it will be run when the USB is
disconnected. This way you can easily program a player that has an uninitialized NAND FLASH
or SPI EEPROM.
Version: 1.4, 2011-10-06
17