English
Language : 

LM3S5739 Datasheet, PDF (805/856 Pages) Texas Instruments – Stellaris® LM3S5739 Microcontroller
Stellaris® LM3S5739 Microcontroller
A
A.1
A.2
A.2.1
Boot Loader
Boot Loader
The Stellaris® Boot Loader is executed from the ROM when flash is empty and is used to download
code to the flash memory of a device without the use of a debug interface. The boot loader uses a
simple packet interface to provide synchronous communication with the device. The boot loader
runs off the internal oscillator and does not enable the PLL, so its speed is determined by the speed
of the internal oscillator. The following serial interfaces can be used:
■ UART0
■ SSI0
■ I2C0
For simplicity, both the data format and communication protocol are identical for all serial interfaces.
See the Stellaris Boot Loader User's Guide for information on the boot loader software.
Interfaces
Once communication with the boot loader is established via one of the serial interfaces, that interface
is used until the boot loader is reset or new code takes over. For example, once you start
communicating using the SSI port, communications with the boot loader via the UART are disabled
until the device is reset.
UART
The Universal Asynchronous Receivers/Transmitters (UART) communication uses a fixed serial
format of 8 bits of data, no parity, and 1 stop bit. The baud rate used for communication is
automatically detected by the boot loader and can be any valid baud rate supported by the host and
the device. The auto detection sequence requires that the baud rate should be no more than 1/32
the internal oscillator frequency of the board that is running the boot loader (which is at least 8.4
MHz, providing support for up to 262,500 baud). This is actually the same as the hardware limitation
for the maximum baud rate for any UART on a Stellaris device which is calculated as follows:
Max Baud Rate = System Clock Frequency / 16
In order to determine the baud rate, the boot loader needs to determine the relationship between
the internal oscillator and the baud rate. This is enough information for the boot loader to configure
its UART to the same baud rate as the host. This automatic baud-rate detection allows the host to
use any valid baud rate that it wants to communicate with the device.
The method used to perform this automatic synchronization relies on the host sending the boot
loader two bytes that are both 0x55. This generates a series of pulses to the boot loader that it can
use to calculate the ratios needed to program the UART to match the host’s baud rate. After the
host sends the pattern, it attempts to read back one byte of data from the UART. The boot loader
returns the value of 0xCC to indicate successful detection of the baud rate. If this byte is not received
after at least twice the time required to transfer the two bytes, the host can resend another pattern
of 0x55, 0x55, and wait for the 0xCC byte again until the boot loader acknowledges that it has
received a synchronization pattern correctly. For example, the time to wait for data back from the
boot loader should be calculated as at least 2*(20(bits/sync)/baud rate (bits/sec)). For a baud rate
of 115200, this time is 2*(20/115200) or 0.35 ms.
November 17, 2011
805
Texas Instruments-Production Data