Datasheet
I2C Bootloader
Document Number: 001-13258 Rev. *J Page 9 of 39
To translate from Blocks to absolute addresses, multiply: Abs_addr = block_number X Block Size. Block_0
starts at addr 0, Block_n starts at address n x Block_size. All blocks are delimited in hex for the bootloader
parameters, so a hex address can be obtained by multiplying by 0x40 (64-byte blocks) or 0x80 (128-byte
blocks).
Hex output files contain an absolute address for each line. Regardless of the block size of the device in
question (0x40/0x80), the hex output file breaks the code into lines of 64(d)/0x40 bytes per line. As a
result, for a 64 byte block device each line represents a block of code. For a 128 byte block device, two
lines from the hex file go into a block (because block 0 starts at address 0, 128 byte blocks must be
ALWAYS considered to have an “even" half representing the lower (address) half and an “odd" half
representing the upper (address) half).
See a hex file and become familiar with the flash block size for the part that you are working with.
Host Application Debugging
An application with a built-in bootloader may be difficult to debug. As a result, there are additional
adjustments that can be made within the BootLdrI2C User Module files. These are contained in the file
BootLdrI2C_Bootloader.inc. This file has a section that contains the following equates:
BOOT_TIMEOUT: EQU 40 ;set to zero to make timeout infinite
CHECKSUM_ON_CKSUMBLK: EQU 1 ;Apply a checksum to the checksum block
;(adds compile steps and code to verify)
The BOOT_TIMEOUT equate enables you to lengthen, shorten, or make infinite code that timeouts if no
communication is received from a host after your command calls the bootloader. This may be useful when
developing or debugging the host application.
The second equate controls the use of the checksum inside the checksum block. If this equate is set to 0,
no verification is done on the checksum inside the checksum block. A checksum verification is still
performed on the entire user application area as defined in the user module parameters.
Placement
The I2CHW User Module allows two choices of SCL and SDA P1[5]/P1[7] or P1[0]/P1[1] and does not
require any digital or analog PSoC blocks. There are no placement restrictions. Placement of multiple I
2
C
modules is not possible because the I
2
C module uses a dedicated PSoC resource block and interrupt.