Functional Description
26.1.7.6.1 Features
•
Supports 12-MHz clock (50% duty cycle).
•
Supports only SPI Mode 3 (clock polarity = 1, clock phase = 1).
•
Supports only 24-bit addressable EEPROMs.
•
Supports only 4-pin SPI mode (CS, CLK, Serial Input, Serial Output).
•
The boot devices must be connected to chip select 0 and must support the read command (03h).
•
The boot image is copied into internal memory and then executed.
26.1.7.6.2 Initialization and Detection
The ROM Code initializes the SPI controller, pin muxing and clocks for communicating with the SPI
device. The controller is initialized in Mode 3 and the clock is setup to operate at 12 MHz. There is no
specific device identification routine that is executed by the ROM code to identify whether a boot device is
preset or not. If no SPI device is present, the sector read will return only 0xFFFFFFFF and the SPI boot
will be treated as failed.
26.1.7.6.3 SPI Read Sector Procedure
The ROM Code reads SPI data from the boot device in 512 byte sectors. For each call to the SPI Read
Sector routine, the SPI Read Command (0x03) is sent along with the 24 bit start address of the data to be
read. Each Sector = 512bytes and the ROM bootloader will attempt the following:
1. Read Sector 1, Check the address: 0x0
2. Read Sector 2, Check the address: 0x200
3. Read Sector 3, Check the address: 0x400
4. Read Sector 4, Check the address: 0x600
The addresses mentioned above should contain the image size. If the value of the addresses mentioned
above is neither 0x0 nor 0xFFFFFFFF, then the boot will proceed else it will move to the next sector. If no
image is found after checking four sectors, the ROM bootloader will move to the next device.
From the next iteration onwards, a dummy value is transmitted on the master out line and the data is
received on the master in line. This needs to be done because SPI protocol always operated in full duplex
mode. The dummy data transmitted by the ROM is the Read Command appended to the start address.
The data from the boot device is received MSB first.
As the A8 is a little-endian processor, and SPI operates in a big-endian format, this means that while
writing to the flash, care needs to be taken to write the image in a big-endian format. This way we can
avoid doing the endian conversion at boot time, thus improving boot performance.
26.1.7.6.4 Pins Used
The list of device pins that are configured by the ROM in the case of SPI boot mode are as follows.
Please note that all the pins might not be driven at boot time.
Table 26-30. Pins Used for SPI Boot
Signal name
Pin Used in Device
cs
spi0_cs0
miso
spi0_d0
mosi
spi0_d1
clk
spi0_sclk
26.1.7.7 Blocks and Sectors Search Summary
summarizes numbers of blocks and sectors which are searched during the memory booting
from devices requiring image shadowing. NAND is organized with blocks, which are erasable units.
4142
Initialization
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated