AN60317: I2C Bootloader supported USB to I2C ports?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KyTr_1955226
Level 6
Level 6
250 sign-ins 10 likes given 50 solutions authored

Hi there all,

I'm working on a project that is expandable via daisy chaining include a number of possible PSoC 5 MCUs (CY8C5467LTI-LP003) in the design (anywhere from 2 to a potential maximum of 8).  I'm considering options for updating firmware in the field, and an I2C bootloader seems the best choice as I can implement it right into my existing I2C bus connecting the PSoC 5 devices.

My question comes about as I was reading the http://www.cypress.com/documentation/application-notes/an60317-psoc-3-and-psoc-5lp-i2c-bootloader ​Application note and the only USB to I2C part shown to be supported in this document is the miniprog3.  This is an okay solution if we don't mind shipping out a miniprog3 to any customer that would need to field-upgrade their system, but I was hoping for something a little more integrated into the design.  I'd prefer to just put a USB to I2C IC on the PCB.

My question is: is there a "supported" list of USB to I2C parts that would be supported by the bootloader host other than the Miniprog3 that I could integrate onto the PCB?  Would something like http://www.cypress.com/part/cy7c65211-24ltxi  be recognized by the bootloader host?  Or is support limited to the miniprog3?

Thanks in advance for any info.

0 Likes
1 Solution
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

Hello Kyle,

Bootloader host supports USB Communication Device Class (CDC). Thus you can select any USB-I2C bridge with CDC support.

CY7C65211-24LTXI can only be configured as USB vendor device. Instead please use CY7C65211A-24LTXI which supports virtual COM port and USB vendor device (Table 1 of datasheet). Please refer to Bootloader Host can´t find USB to I2C Bridge on similar query.

Best Regards,

Geona Mary

View solution in original post

6 Replies
GeonaP_26
Moderator
Moderator
Moderator
250 solutions authored 100 solutions authored 50 solutions authored

Hello Kyle,

Bootloader host supports USB Communication Device Class (CDC). Thus you can select any USB-I2C bridge with CDC support.

CY7C65211-24LTXI can only be configured as USB vendor device. Instead please use CY7C65211A-24LTXI which supports virtual COM port and USB vendor device (Table 1 of datasheet). Please refer to Bootloader Host can´t find USB to I2C Bridge on similar query.

Best Regards,

Geona Mary

Geona,

Thanks for the answer.  I'll probably end up using the CY7C65211A-24LTXI in that case.

One further question though.  For loading through UART and USB HID I had no trouble finding the necessary libraries to build a bootloader host application in C# .NET.  (see sample projects at http://www.cypress.com/documentation/application-notes/an73503-psoc-usb-hid-bootloader).  I can't seem to find the same for a USB-I2C CDC interface?  Are there libraries out there for this?  Or will the CY7C65211A configured for I2C show up in windows as a virtual COM port?

I'd like to test this out to see if I can get it working but it looks like the test kit:

http://www.cypress.com/documentation/development-kitsboards/cyusbs234-usb-serial-single-channel-deve...

has only the CY7C65211 (no A variant).  Are they pin for pin compatible (could I just drop a CY7C65211A onto that test kit?)

Thanks again,

-Kyle

0 Likes

Hello Kyle,

CY7C65211A if configured for I2C as CDC class device will show under Virtual COM Ports. The Cypress VCP library provides the required APIs to communicate with the device and you can use the it to build your bootloader host application. You can find the library at the following installation path after installing the USB Serial SDK - C:\Program Files (x86)\Cypress\USB-Serial SDK\library\CyUSBSerialVCP along with the guide at C:\Program Files (x86)\Cypress\USB-Serial SDK\documentation\Cypress USB-Serial VCP I2CSPI API Guide. The CY7C65211A is pin by pin compatible with the non-A part so you could use the same DVK for testing.

Best Regards,

Sananya

OK so from what I understand:

CY7C65211

- Must have cypress vendor driver to be used as a USB-I2C bridge.

- Cannot be used as USB-I2C device for use with the Bootloader Host built into Creator.

- Uses API contained at \CYUSBS234 DVK\1.0\library

CY7C65211A

- Supports using generic CDC/VCP driver rather than cypress vendor driver for use as USB-I2C bridge.

- Can be used as USB-I2C device for use with the Bootloader Host built into Creator.

- Uses API contained at \Cypress\USB-Serial SDK\library\CyUSBSerialVCP

I need something that I can send to customers for USB-I2C bootloading a PSoC5LP from a Windows PC in the field.  So this makes compatibility with the Bootloader Host built into creator basically a moot point doesn't it?  With either of these parts I will need to make my own Bootload_Utils.dll using the API that corresponds to that part to create the necessary functions (OpenConnection, CloseConnection, ReadData,WriteData).  Vendor/VCP is really just a matter of driver choice then yes?  Vendor I would need to provide the cypress driver and VCP would not require a custom driver (Or would I need a Cypress VCP driver)?

Just checking to make sure I have this all correct in my head before diving in.

0 Likes

Yes, your understanding on CY7C65211 and CY7C65211A are correct.

If you have CDC class, bootloader host will support bootloading. User does not need to re-configure the bootloader host part. The vendor class driver does not seem to support this operation by default. You can use the C++ APIs to create scripts and tools included with the USB-Serial SDK to evaluate and control the vendor class bridge operations.

0 Likes

At the end of the day though it doesn't matter if the Bootloader Host (the one that is built into Creator) supports it natively since it's not really a standalone program I could ship to a customer for loading in the field (P.S. to Cypress, it would be REALLY handy to have that bootloader host as a standalone program).  For that I need to build my own bootloader and that's the hill I'm attempting to climb.  The bootloader hosts I've built for PSoC have both been in Winforms (C# .NET), as it's easy to get an application up and running quickly, and the example code from AN73503 (HID Bootloader) and AN68272 (UART Bootloader) is for C# .NET.  Unfortunately this USB-Serial API is C++.

I need to be able to get the communication API on the same platform as the bootloader API.  This leaves two options:

1) Get the bootloader utilities libraries into a C++ project, I've built bootloader_utils.dll/.lib from the source provided with Creator in C++, but to use it in a C++ application I need a .h file to interface with it.  Is there a reference or guide for what should be in the header file for the bootloader_utils library?

2) Get the USB-I2C API into .NET.  I'm rather surprised this isn't something that's available, since it looks like the cypress generic Bootloader Host as well as the USB-Serial config that comes with the CYUSBS234 (and the USB-Serial SDK) look like they're built in .NET (so the work in this case seems to already have been done).

I've actually made a separate thread regarding this:

Re: CYUSBS234: Using libraries in .NET

0 Likes