www.ti.com
Init Boot
Initialize device
OBJMODE=1
AMODE = 0
MOM1MAP=1
DP = 0
OVM = 0
SPM= 0
SP = 0x400
Dummy read of
CSM password
locations
Call
SelectBootMode
Call
ExitBoot
2.13
SelectBootMode Function
SelectBootMode Function
Figure 2-7. Overview of InitBoot Assembly Function
To determine the desired boot mode, the SelectBootMode function examines the state of 3 GPIO pins as
shown in
Table 2-5. Boot Mode Selection
Mode
Description
GPIO18
GPIO29
GPIO34
SPICLKA
(1)
SCITXA
SCITXB
Boot to Flash
(2)
Jump to flash address 0x3F 7FF6. You must have
1
1
1
programmed a branch instruction here prior to reset to
redirect code execution as desired.
SCI-A Boot
Load from SCI-A.
1
1
0
SPI-A Boot
Load from an external serial SPI EEPROM on SPI-A.
1
0
1
I
2
C-A Boot
Load from an external EEPROM at address 0x50 on the
1
0
0
I
2
C-A bus.
eCAN-A Boot
(3)
Call CAN_Boot to load from eCAN-A mailbox 1.
0
1
1
Boot to M0 SARAM
(4)
Jump to M0 SARAM address 0x00 0000.
0
1
0
Boot to OTP
(4)
Jump to OTP address 0x3D 7800.
0
0
1
Parallel I/O Boot
Load from GPIO0 - GPIO15.
0
0
0
(1)
You must take extra care because of any effect toggling SPICLKA to select a boot mode may have on external logic.
(2)
When booting directly to flash, it is assumed that you have previously programmed a branch statement at 0x3F 7FF6 to redirect
program flow as desired.
(3)
On devices without an eCAN-A module, this mode is reserved and should not be used.
(4)
When booting directly to OTP or MO, it is assumed that you have previously programmed or loaded code starting at the entry
point location.
For a boot mode to be selected, the pins corresponding to the desired boot mode have to be pulled low or
high until the selection process completes. Note that the state of the selection pins is not latched at reset;
they are sampled some cycles later in the SelectBootMode function. The internal pullup resistors are
enabled at reset for the boot mode selection pins. It is still suggested that the boot mode configuration be
made externally to avoid the effect of any noise on these pins.
The SelectBootMode function checks the missing clock detect bit (MCLKSTS) in the PLLSTS register to
determine if the PLL is operating in limp mode. If the PLL is operating in limp mode, the boot mode select
function takes an appropriate action depending on the boot mode selected:
•
Boot to flash, OTP, SARAM, I
2
C-A, SPI-A and the parallel I/O
These modes behave as normal. The user's software must check for missing clock status and take the
appropriate action if the MCLKSTS bit is set.
30
Bootloader Features
SPRU722C – November 2004 – Revised October 2006