[SOLVED] Is synchronous transfers broken in FX3?

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I try to run this firmware image on my FX3 (CYUSB3KIT-003) dev kit

   

http://www.cypress.com/file/340976/download

   


I upload it to my FX3 with fxload:

   

found device 'Cypress FX3' [04b4:00f3] (8,23)
microcontroller type: fx3
/tmp/UsbI2cRegMode.img: type Cypress IMG format
open firmware image /tmp/UsbI2cRegMode.img for RAM upload
normal FW binary executable image with checksum
FX3 bootloader version: 0x000000A9
writing image...
transfer execution to Program Entry at 0x400079a4

   


I observe the following on the FX3 serial port

   

��<0: Device initialized. Firmware ID: 20 33 58 46 0 43 32 49
��<1: Device initialized. Firmware ID: 20 33 58 46 0 43 32 49

   

Then I launch the cyusb_linux GUI tool send the following:

   

bType 0x40
bRequest 0xB0
which I have extracted from the cyfxusbi2cregmode.c source:

   

Download cypress-control.png

   

And it results in the error shown in the above. By inspecting the source code I would have expected to receive the above firmware ID?

   

Does this mean that synchronous transfers are broken, or have I done something wrong above?

   

BTW If I build cyfxusbi2cregmode.c, then generate and upload the image file I get the same result.

0 Likes
5 Replies
Anonymous
Not applicable

The size is 8bytes. I can read the eeprom with 1k wLength on a superspeed bus.

0 Likes
Anonymous
Not applicable
BTW: Wouldn't it be better if the firmware code in cyfxusbi2cregmode.c               case CY_FX_RQT_ID_CHECK:                 CyU3PUsbSendEP0Data (8, (uint8_t *)glFirmwareID);                 break;
   

Did

   
            case CY_FX_RQT_ID_CHECK:                 status = CyU3PUsbSendEP0Data (8, (uint8_t *)glFirmwareID);                 break;
   

Then it would detect any failure returned by CyU3PUsbSendEP0Data?

0 Likes
Anonymous
Not applicable

Yes, that's true. You can check the return value for debugging. Please make sure if you the vendor command is triggering this case. Next check if the return status is a failure. If it fails, please check the error code returned. 

0 Likes
Anonymous
Not applicable

It's also quite unstable. I'm getting the "Vendor command failed" with  bmReqType=40, bRequest=bb, wValue=0000, wIndex=0000, wLength=1024.

0 Likes
Anonymous
Not applicable

I checked the default firmware provided in the FX3 SDK on Windows and it works fine (B-type Vendor/0x40,  bRequest 0xB0. and Direction In) . Can you verify if your firmware works fine on Windows? If so, we will have to look at the Linux side, else must also check the I2C communication.  Please check the return status of CyU3PUsbGetEP0Data when it fails.

0 Likes