M-Boot ROM Description
603
SPRUHE8E – October 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
ROM Code and Peripheral Booting
The bootstrap protocol (BOOTP), a predecessor to the DHCP protocol, is used to discover the IP address
of the client, the IP address of the server, and the name of the firmware image to use. BOOTP uses
UDP/IP packets to communicate between the client and the server; the bootloader acts as the client. First,
it will send a BOOTP request using a broadcast message. When the server receives the request, it will
reply, thereby informing the client of its IP address, the IP address of the server, and the name of the
firmware image. Once this reply is received, the BOOTP protocol has completed.
Then, the trivial file transfer protocol (TFTP) is used to transfer the firmware image from the server to the
client. TFTP also uses UDP/IP packets to communicate between the client and the server, and the
bootloader also acts as the client in this protocol. As each data block is received, it is programmed into
flash. Once all data blocks are received and programmed, the device will automatically start running the
new firmware image.
Note:
When using the Ethernet update, the bootloader can only program images to the RAM beginning
from 0x20005000 since there is no mechanism in BOOTP to specify the address to program the image.
The following IETF specifications define the protocols used by the Ethernet update mechanism:
RFC951 (http://tools.ietf.org/html/rfc951.html) defines the bootstrap protocol
RFC1350 (http://tools.ietf.org/html/rfc1350.html) defines the trivial file transfer protocol.
6.5.15.2.1 M-Boot ROM EMAC Interface IO
M-Boot ROM provides two options for the user to boot from EMAC. Boot Mode 4 and Boot Mode 12 are
both exactly same except that they use different IOs for the EMAC. The IOs used by both these modes
are listed in
EMAC boot mode needs to configure the management clock divider for 2.5 MHz; for this it has to know
the MAINOSC frequency connected to the device. M-Boot ROM reads location 0x68101C for this
operation. This location belongs to User OTP where the user can program the clock frequency provided
with the device. If the value at this location is read to be 0xFFFFFFFF or 0x00000000 then M-Boot ROM
assumes the default 20 MHZ frequency for the divider calculations. If any other value is read then M-
BootROM will use that value.
6.5.15.2.2 M-Boot ROM EMAC ID Configuration
M-Boot ROM follows below procedure to determine the EMAC ID of the device, when using EMAC boot
mode.
The locations below in Customer OTP memory must be programmed by user to let M-Boot ROM use the
EMAC ID provided by user.
Locations to be programmed will be referred to as below and point to the addresses as shown below:
CUSTOMER_OTP_EMAC_REG0_ADDR = 0x681010
CUSTOMER_OTP_EMAC_REG1_ADDR = 0x681014
A MAC address of 12:34:56:78:9A:BC should get stored/programmed as:
CUSTOMER_OTP_EMAC_REG0_ADDR = 0x00563412
CUSTOMER_OTP_EMAC_REG1_ADDR = 0x00BC9A78
The top byte of each EMACID location is all 0x00. Only the lower 3 bytes of each EMACID location are
used as shown above. If the top byte of either EMACID location is not ‘0’, then the default EMAC ID will
be used by M-Boot ROM.
Default EMAC ID used by M-Boot ROM – 0x1A:B6:00:64:00
6.5.15.2.3 M-Boot ROM EMAC Boot Functional Flow
When performing an Ethernet bootloader, EnetConfig()is used to configure the Ethernet controller, making
it ready to be used to download the application onto the master subsystem RAM. Then, Update() function
calls into UpdateBOOTP() function which begins the process of the application download.
The below function call sequence gives details of the flow when EMAC boot mode is selected on the
device.