Datasheet
I2C Bootloader
Document Number: 001-13258 Rev. *J Page 6 of 39
(which is created with the application). If the two checksums are equal, the bootloader utility allows the
foreground application to execute. If the two checksums are not equal, the bootloader enters a wait loop
for a host application to download a valid application. It also enables its own I
2
C subsystem to allow the
host to transmit data. When the host system observes this interface enabled, it may choose to execute its
own set of applications. Two download file formats for downloading an application to a target are
automatically supported by the user module tools. The first is an output file named <project_name>.txt and
the second is an output file named <project_name>.dld. Each of these download file formats is supported
by a different demonstration tool.
Download Methods
1. The .txt file can be downloaded by using the CY3240 USB-I
2
C bridge kit. The associated tool can be
used to download the .txt file format as explained in AN45683. For more information on how to use the
CY3240 USB-I
2
C bridge, see the application note AN2352 “PSoC
®
1 Communication - I2C-USB Bridge
Usage”. This method is also discussed in the Appendix of this user module datasheet.
2. A second method of downloading an application is also supported. This method is more complicated
than the previous method, but may give more information on developing a custom I2C download
application for the finished product. A brief discussion of this host application is given here. An example
application and source code is given in the installation directory of PSoC Programmer 3:
[Install path]\Cypress\Programmer\3.xx\Bootloaders\BootLdrI2C\BootLoaderHostApp\…
Two applications are given for demonstrating the I
2
C bootloader. The first is a PSoC 27000 based
application (a complete PSoC project is included) that is capable of translating RS-232 communication
containing embedded bootloader download records to I
2
C packets sent to the Bootloader application.
Source code is given for this PSoC project. It can be easily adapted to other PSoC Device architectures.
The second application is a Microsoft Visual Studio application, I
2
C Bootloader Host, given with an
installer and source code for modification. It can read and parse the download file <fiilename>.dld and
transmit it to the PSoC project mentioned earlier in this section. Source code for this application is also
given for use with Microsoft Visual Studio 2005. This application is for demonstration purposes only and is
not intended for production use or resale.
Note In some cases, you may need to install the file mscomm32.ocx in your computer. Download this
file from the Microsoft website and install it using the Windows/ accessories/command prompt win-
dow and the command:
> regsvr32 mscomm32.ocx
The file regsvr32.exe is in the Windows installation folder windows/system32 (winXP).
The file mscomm32.ocx is available for download from the Microsoft website by searching for the filename
“mscomm32.ocx".
Bootloader Tools
Several tools are available from the shortcut menu accessed by right-clicking on the user module icon.
Select BootLoader Tools from the dropdown menu.
The “Get Files" selections add special versions of boot.tpl, custom.lkp, and HTLinkOpts.lkp that can be
placed in the project or removed. From the main menu, select Tools Restore Default Boot files to remove
these. If the BootLdrI2C User Module is removed, the option to restore the default boot files is no longer
available from the user module icon and can be accessed from the tools tab in the main menu of PSoC
Designer.