M-Boot ROM Description
606
SPRUHE8E – October 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
ROM Code and Peripheral Booting
Table 6-9. M-Boot ROM CAN Boot Commands (continued)
Serial
No.
Command Name
Command Value
Description
5.
LM_API_UPD_RUN
0x1F020200
This command is sent to the bootloader to transfer
execution control to the specified address. The command
is followed by a 32-bit value, transferred MSB first, that is
the address to which execution control is transferred.
The format of the command is as follows:
unsigned char ucCommand[5];
ucCommand[0] = COMMAND_RUN;
ucCommand[1] = Run Address [31:24];
ucCommand[2] = Run Address [23:16];
ucCommand[3] = Run Address [15:8];
ucCommand[4] = Run Address [7:0];
6.
LM_API_UPD_ACK
0x1F020100
This message is sent from the boot laoder if it receives a
valid packet. There is no DATA associated with the packet.
7.
LM_API_UPD_NACK
0x1F0201C0
This message is sent from the boot laoder if it receives an
invalid packet or an unsupported command. There is no
DATA associated with the packet.
The bootloader uses the PacketWrite() function in order to send a packet of data to another device. This
function encapsulates all of the steps necessary to send a valid packet to another device including waiting
for the acknowledge or not-acknowledge from the other device.
Received packets use the same format as sent packets. The bootloader uses the PacketRead () function
in order to receive or wait for a packet from another device. This function does not take care of
acknowledging or not-acknowledging the packet to the other device. This allows the contents of the packet
to be checked before sending back a response.
The steps necessary to acknowledge reception of a packet are implemented in the UpdaterCAN ()
function. If this function detects that a valid command is received from the sender then it acknowledges
the packet by sending an LM_API_UPD_ACK. If the received packet/command is not valid then the NACK
packet is sent as shown in above table.
A not-acknowledge byte is sent out whenever a sent packet is detected to have an error, usually as a
result of a checksum error or just malformed data in the packet. This allows the sender to re-transmit the
previous packet.
The below function call sequence gives details of the flow when the CAN boot mode is selected on the
device.
•
ResetIsr()
•
mbrom_init_device()
•
mbrom_master_system_init ()
•
mbrom_control_system_init()
•
mbrom_analog_system_init()
•
M-Boot ROM WIR Mode Check – Please refer to WIR Mode section in
System Control and Interrupts
chapter.
•
mbrom_get_bootmode()
–
ConfigureCAN();
•
UpdaterCAN();
•
mbrom_start_app(M_BOOT_ROM_CAN_BOOT_MODE_ENTRY_POINT)