This application report describes various boot mechanisms supported by the AM18xx bootloader read-only memory (ROM) image. Topics covered include the Application Image Script (AIS) boot process, an AISgen tool used to generate boot scripts, protocol for booting the device from an external master device, a UART Boot Host GUI for booting the device from a host PC, and any limitations, default settings, and assumptions made by the bootloader.
Project collateral discussed in this application report can be downloaded from the following URL: http://www.ti.com/lit/zip/spraba5.
Code Composer Studio is a trademark of Texas Instruments.
Windows, Microsoft are registered trademarks of Microsoft Corporation in the United States and.
All other trademarks are the property of their respective owners.
The AM18xx bootloader resides in the ROM of the device. This document describes the boot protocol used by the bootloader, discusses tools required to generate boot script, and talks about limitations/assumptions for the bootloader.
The AM18xx bootloader has undergone multiple revisions. To check the version of your device, perform the following steps.
The text d800k008 should appear in the memory window at offset 0x08. For earlier ROM revisions, the text could also appear as d800k002, d800k004, or d800k006. It’s important to know your ROM revision when generating boot images. If you don’t see any of these values in the memory window, this document is not applicable to your device. An abbreviated summary of the ROM boot loader revision history can be found in Section E.
The bootloader supports booting from various memory devices (master mode) as well as from an external master (slave mode). A complete list of the supported boot modes and the configuration of the boot pins to select each one of them can be found in Section A.
All boot modes, except the host port interface (HPI) and two out of the three NOR-boot modes, make use of the AIS for boot purpose. AIS is a Texas Instruments, Inc. proprietary boot script format widely used in TI devices. All boot modes supporting AIS present a unified interface to you. AIS and AISgen, the tool used to generate AIS, will be discussed in detail later in this document.
There are few boot modes that do not make use of AIS and have a special boot interface. For instance,
Each of these will be discussed later in the document.
NOR (or parallel Flash) boot happens from a NOR Flash device connected to the external memory interface (EMIFA) peripheral on EMA_CS[2]. For this boot mode, the bootloader configures EMIFA for 8-bit access and reads the first word from the NOR Flash. This first word indicates if the NOR Flash should be accessed in 16-bit or 8-bit mode, as well as which boot method to be used. This word is interpreted as shown in Figure 1
The NOR boot configuration word register is shown in Figure 1 and described in Table 1.
31 | 12 | 11 | 8 |
Reserved | COPY |
7 | 6 | 5 | 4 | 3 | 1 | 0 |
Reserved | METHOD | Reserved | ACCESS |
Bit | Field | Value | Description |
---|---|---|---|
31-12 | Reserved | 0 | Reserved |
11-8 | COPY | Length of data to copy from the base of the NOR Flash to the base of the On-chip RAM. This value is used only for the Legacy NOR boot method. | |
0x00 | 1 KB | ||
0x01 | 2 KB | ||
... | |||
0x0E | 15 KB | ||
0x0F | 16 KB | ||
7-6 | Reserved | 0 | Reserved |
5-4 | METHOD | Boot method | |
0x0 | Legacy NOR boot | ||
0x1 | Direct NOR boot | ||
0x2 | AIS NOR boot | ||
3-1 | Reserved | 0 | Reserved |
0 | ACCESS | EMIFA access mode | |
0x0 | 8-bit access | ||
0x1 | 16-bit access |
If ACCESS == 0x1, bootloader reconfigures EMIFA for 16-bit access before using specified boot METHOD to boot from NOR. The default configuration of the bootloader is for an 8-bit access.
When METHOD==0x0, the Legacy NOR boot option will be executed. For Legacy NOR boot, the bootloader copies a block of data, whose size is indicated by the COPY field, from the start of NOR Flash (address 0x60000000) to the start of On-chip RAM (0x80000000). This block of data should hold a secondary bootloader, as shown in Figure 2.
After copying the required data to On-chip RAM, the bootloader transfers control to the secondary bootloader by branching to address 0x80000004.
When METHOD==0x1, the Direct NOR boot option will be executed. For Direct NOR boot, the bootloader transfers control directly to the secondary bootloader present in NOR Flash by branching to address 0x60000004. The secondary bootloader is directly executed from there.