Datasheet
I2C Bootloader
Document Number: 001-13258 Rev. *J Page 33 of 39
Table 5. Slave Address Read Responses
For details, see the BootLoader operation flowchart at the end of this document.
Slave address write commands do not require responses, so the next two bytes of each of the slave
address write lines is an I
2
C prefix that the bootloader ignores. Use the Ignore_N_I2C_Prefix_Bytes
parameter to set the number of prefix bytes used in your application.
The first and third lines of the sample download record contain bootloader commands. The bootloader
commands listed in Table 6 are used:
Table 6. Bootloader Commands
All bootloader commands must be sent with the bootloader key. The bootloader ignores commands that
are not sent with the proper key. You can set the bootloader key with the Bootloader_Key parameter.
Bootloader Write Block Command
Most of the commands sent to the bootloader are write block commands. The format of each of the write
block commands is identical. The third block contains the checksum information. The format of the
checksum block is discussed in this section. Each of the other write block command transmits a 64-byte
hex record to the bootloader in five packets totalling 78 bytes (neglecting addresses and discarded
prefixes).
The first line of the write block command contains a control byte, an ignored 2-byte I
2
C prefix, the write
block command, the bootloader key, the block number being transmitted, and the first four bytes of data.
The block number in this example is 0x0002, which corresponds to ROM address 0x0080.
Code Meaning
0x20 Bootload mode (Success). Received 'Enter bootloader' command with valid
bootLoader Key.
0x02 Image verify error. The checksum of application and relocatable interrupt
vector areas calculated by the bootloader does not match the checksum
received from the Host.
0x04 Flash checksum error. The flash block content does not match the data
received from Host.
0x08 Flash protection error. Flash block cannot be rewritten because its flash
protection level does not allow this.
0x10 Comm checksum error. Received a packet with incorrect checksum.
0x40 Invalid bootloader key. A packet with the incorrect bootLoaderKey value was
received.
0x80 Invalid command error. Unknown command was received.
Command Meaning
FF38 Enter bootloader
FF39 Write block
FF3B Exit bootloader