Dear, all
I had downloaded "EZ-USB FX3 SDK v1.2.3 for Linux" from the web-sit, and compiled the application of cyusb_linux. By using cyusb_linux, it could download firmware to RAM successfully, but I couldn't use the cyusb_linux download firmware to large EEPROM(64KB). Also the application didn't give any error from it, and the progress bar had 100% completed, but the EEPROM didn't update.
I viewed the source code of Fx2_eeprom_download.cpp(in cyusb_linux_1.0.3/gui_src), in the function fx2_eeprom_download, the code is:"r = cyusb_control_transfer(h, 0x40, 0xA2, address, 0x00, buf, 64, 1000);",
the return value of r is -7 at first, and the all of the next are -9. Nevertheless the assertion is:
if ( !r ) {
printf("Error in control_transfer\n");
return r;
}, it doesn't meet.
The doc of cyusb_linux_programmers_guide says the function cyusb_control_transfer's return value: 0 on success, or an appropriate LIBUSB_ERROR, and -7 instruct timeout. Nonetheless when this error occur and why it occurred?
I also debugged the application download firmware to internal RAM(it can update RAM successfully), the function cyusb_control_transfer's return value is 10 or 16 or 11, it don't like the document says 0 means success, others are error. Thus, which is right? The code of the source, or the document, or I misunderstand?
The same hardware could download firmware to EEPROM by using Control Center in Windows.
How to fix the problem of downloading firmware to EEPROM?
Thank you
Best wishes
Xiaodong Wang
"EZ-USB FX3 SDK v1.2.3 for Linux" is on the web-sit: http://www.cypress.com/?rID=57990
|