cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

ptphucbk
New Contributor II

Hi all,

I have my cypress FX3 with PMOD configured in I2C --> USB. 

The cypress works great with firmware in I2C EEPROM.

However in my situation where I have only remote access to a linux machine that connects to cypress by USB. And I want to update the firmware on the cypress from USB. So I want to somehow force the fallback so that I can load the firmware from the linux machine.

I know that in the document of FX3:

The I2C EEPROM boot fails under the following conditions:

• I2C address cycle or data cycle error

• Invalid signature in FX3™ firmware image

• Invalid image type

So my only option is to provoke the error on I2C bus so that it falls back to USB. 

Is there anyone was in the same situation and have a solution for that ?

Thank you very much

0 Likes
1 Solution
AliAsgar
Moderator
Moderator

Hello,

A feature of writing EEPROM can be included in the application firmware. When USB fallback is needed, use this feature to modify the first two bytes of the firmware image. This will lead to USB fallback.

Best Regards,
AliAsgar

View solution in original post

0 Likes
7 Replies
AliAsgar
Moderator
Moderator

Hello,

A feature of writing EEPROM can be included in the application firmware. When USB fallback is needed, use this feature to modify the first two bytes of the firmware image. This will lead to USB fallback.

Best Regards,
AliAsgar

View solution in original post

0 Likes
ptphucbk
New Contributor II

Thank you for your answer.

I cannot change the firmware on cypress for now so is there any other option to write to EEPROM ? I saw the vendor commands but I wonder if it's possible with them.

Sorry for my naive questions. I'm new to cypress development.

0 Likes
AliAsgar
Moderator
Moderator

Hello,

Yes, its possible to write EEPROM using vendor commands. Kindly refer to UsbI2cDmaMode firmware example in the FX3 SDK on the implementation.

Best Regards,
AliAsgar

0 Likes
ptphucbk
New Contributor II

Thank you for your quick reply.

Is the vendor commands work also when cypress boots from I2C mode ? Or it works only when cypress is already in usb mode ?

My cypress boots well in I2C mode with an uvc firmware and I want to change to usb mode while it's in I2C mode and running uvc firmware in order to update the firmware.

I will take a look at UsbI2cDmaMode. Thank you very much.

0 Likes
AliAsgar
Moderator
Moderator

Hello,

Vendor commands work when cypress FX3 is in I2C mode. Control pipes are required between host and USB device.

Best Regards,
AliAsgar

0 Likes
ptphucbk
New Contributor II

Hi, 

My firmware is based on https://www.cypress.com/documentation/application-notes/an75779-how-implement-image-sensor-interface...

How can I create control pipes for it ?

Thanks

0 Likes
AliAsgar
Moderator
Moderator

Hello,

I had mentioned control pipes only to highlight the fact that there has to be USB connection between the USB device and the host for sending vendor commands. Pipes are created internally.

Please check the writing EEPROM procedure in UsbI2cDmaMode firmware example in FX3 SDK, and integrate that procedure with the firmware mentioned above.

Note: AN75779 firmware also has I2C. FX3 I2C master can only access one slave at a time.

Best Regards,
AliAsgar

 

0 Likes