download_fx3 sample program not working.

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

cross mob
PeSh_4780406
Level 1
Level 1

I am working on porting some windows software over to ARM Linux and running into issues updating firmware on the FX3.

Went back to the sample programs included in cyusb_linux_1.0.5/src/ and tried to use download_fx3 to load a working image to ram.

When I run the program I get:

$ ./download_fx3 -t RAM -i ./SlaveFifoSync.img

Error: Vendor write to FX3 RAM failed

Error: Failed to download data to FX3 RAM

Error: FX3 firmware programming failed

Dumping out the return code from the first error message I get back -9 (LIBUSB_ERROR_PIPE)

If I send other control messages down to the existing firmware on the FX3 I get back the expected messages with no issues. So the hardware and overall library build looks good. Is there something I need to do first to prep the device to receive a new image from the above program?

0 Likes
1 Solution

Hello,

Looks like Fx3 is booting from I2C EEPROM or SPI flash connected to it.

For programming FX3 RAM, the device should enumerate as Bootloader with VID and PID 04B4 and 00F3.

Please disconnect the I2C EEPROM or SPI flash, and reset the device, so that the fx3 will enumerate with the required VID/PID.

Then you can use the linux application to program the RAM / I2C EEPROM / SPI Flash.

Thanks,

Yatheesh

View solution in original post

0 Likes
8 Replies
PeSh_4780406
Level 1
Level 1

Bit more information on the windows side they are calling:

m_UsbDevice.DownloadFw("../Resources/SlaveFifoSync.img", RAM);

0 Likes

Hello,

Can you please let me know if the FX3 device is enumerated as Bootloader device with VID 04B4 and PID 00F3, before programming the RAM?

Thanks,

Yatheesh

0 Likes

Currently the device is identifying as 04b4:00F1

0 Likes

Hello,

Looks like Fx3 is booting from I2C EEPROM or SPI flash connected to it.

For programming FX3 RAM, the device should enumerate as Bootloader with VID and PID 04B4 and 00F3.

Please disconnect the I2C EEPROM or SPI flash, and reset the device, so that the fx3 will enumerate with the required VID/PID.

Then you can use the linux application to program the RAM / I2C EEPROM / SPI Flash.

Thanks,

Yatheesh

0 Likes

Ok will have to go back to the firmware developers and find out how they are updating devices today. I know they are able to update firmware without disconnecting any hardware.

0 Likes
PeSh_4780406
Level 1
Level 1

Ok confirmed with my firmware developers they are able to update firmware on the FX3 without putting the device in bootloader mode using this windows CyAPI call:

m_UsbDevice.DownloadFw("../Resources/SlaveFifoSync.img", I2CE2PROM);

Is there a equivalent command in the Linux cyusb library? If not is the source code for the DownloadFw() function available somewhere?

0 Likes

Hello,

cyusb_download_fx3() function can be used from the Fx3 Linux Library.

The source of the DownloadFw() function can be found in the  CyUSB3_USB_Suite_Source.zip  from the FX3 SDK

Thanks,

Yatheesh

0 Likes

Thanks for the pointers to the source.

Found the path though the source that our development team was using. There is a path in the I2CE2PROM branch that uses the 0xBA opcode which allows overwriting the I2C eeprom directly without invalidating the image and resetting first.

Was able to port the code and build a similar function for our linux tool.

Thanks again for the help!

0 Likes