C-Boot ROM Description
605
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
ROM Code and Peripheral Booting
Table 6-28. SPI 8-Bit Data Stream (continued)
Byte
Contents
...
...
...
Data for this section.
...
n
LSB: 00h
n+1
MSB: 00h - indicates the end of the source
The data transfer is done in "burst" mode from the serial SPI EEPROM. The transfer is carried out entirely
in byte mode (SPI at 8 bits/character). A step-by-step description of the sequence follows:
Step 1.
The SPI-A port is initialized
Step 2.
The GPIO19 (SPISTE) pin is used as a chip-select for the serial SPI EEPROM or flash
Step 3.
The SPI-A outputs a read command for the serial SPI EEPROM or flash
Step 4.
The SPI-A sends the serial SPI EEPROM an address 0x0000; that is, the host requires that
the EEPROM or flash must have the downloadable packet starting at address 0x0000 in the
EEPROM or flash. The loader is compatible with both 16-bit addresses and 24-bit addresses.
Step 5.
The next word fetched must match the key value for an 8-bit data stream (0x08AA). The least
significant byte of this word is the byte read first and the most significant byte is the next byte
fetched. This is true of all word transfers on the SPI. If the key value does not match, then the
load is aborted and
Step 6.
The next 2 bytes fetched can be used to change the value of the low speed peripheral clock
register (LOSPCP) and the SPI baud rate register (SPIBRR). The first byte read is the
LOSPCP value and the second byte read is the SPIBRR value. The next 7 words are
reserved for future enhancements. The SPI bootloader reads these 7 words and discards
them.
Step 7.
The next 2 words makeup the 32-bit entry point address where execution will continue after
the boot load process is complete. This is typically the entry point for the program being
downloaded through the SPI port.
Step 8.
Multiple blocks of code and data are then copied into memory from the external serial SPI
EEPROM through the SPI port. The blocks of code are organized in the standard data stream
structure presented earlier. This is done until a block size of 0x0000 is encountered. At that
point in time the entry point address is returned to the calling routine that then exits the
bootloader and resumes execution at the address specified.