DownloadFw fails to download programming file to FX3 ram

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

cross mob
GaDo_4262121
Level 1
Level 1
Welcome! 5 replies posted First question asked

I have been using the 2nd stage bootloader for a while on another computer (Win 10 with USB3) and it has been working fine.

I have now got a new Win 10 PC from HP with all USB3 ports and programming the FX3 Ram fails virtually every time in both my application and the Control Center.

DownloadFw just doesn't work and there doesn't seem to be a way to debug this.

A lot of users have complained about this. On my old PC I made it 100% reliable by setting my bootloader to start in USB2 mode.

99 times out of 100 it doesn't work on my new PC.

Any ideas on how to move forward?

I have uploaded the latest microsoft/intel drivers. It is an Intel USB 3.1 eXtensible Host ~Controller - 1.10 (Microsoft)

0 Likes
1 Solution

Hello Gary,

Both the boot firmware are found to be working fine in downloading the application firmware onto the FX3 RAM. Please let me know what application firmware are you trying to load into the FX3 RAM from the boot-loader.

EDIT: Please note that the USB 2.x version does not affect in loading the firmware into the FX3 RAM.

Best regards,

Srinath S

View solution in original post

0 Likes
13 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

- Please let me know if the issue is seen on the ROM boot-loader or in the second stage boot-loader.

- Are there any error messages seen on the Control Center while trying to program the firmware?

- Kindly, capture USB traces during failure and share the same.

Best regards,

Srinath S

0 Likes

Hi Srinath,

Thanks for the reply.

How do I boot from the ROM bootloader? I have already programmed the EEPROM. Is there a way to erase it and get back to the ROM boot?

There are no error messages on the Control Center apart from it takes a good few seconds to come up with "Programming Failed" at the bottom.

I have downloaded a USB Monitor program (from USB Sniffer-Protocol Analyzer: Software USB Port Data Monitor 4 Windows ).

I have discovered that if I run the analyzer program then the programming succeeds!

If i don't run the analyzer then it fails to program the ram.

The above is very consistent.

Could it be that the analyzer program is slowing down the access slightly and causing it to work?

Best regards,

Gary

0 Likes
lock attach
Attachments are accessible only for community members.

Update. I managed to focus my USB analyzer program on my USB keyboard while it logged the FX3 packets in the background.

If I focus the window so the FX3 packets are visible then the programming fails.

If I have it logging the FX3 packets in the background then it succeeds.

Please see the attached packet logs

The fail logs are much shorter and always seem to end when the status changes from 0 to 0x80000300.

008905: Control Transfer (UP), 2019-06-04 16:06:46.8132229 +0.0000212. (1. Device: FX3) Status: 0x80000300

0 Likes

Seems to go wrong when the status shows

006727: Control Transfer (UP), 2019-06-04 15:12:56.5502021 +0.0022991. (1. Device: FX3) Status: 0xc0000011

0 Likes

Is there any update to this?

I would like to try changing the timeout in the DownloadFw function as I think this may be the problem.

How can I do this?

Thank you!

0 Likes

Hello,

- The control endpoint by default has a time-out of 10 seconds which should be sufficient for the firmware download.

- Can you please try using the FwDownloadApp.exe utility present in the following path.

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\fwdownload_fx3\x86\Release

- Is this issue seen across multiple boards or is it on a specific board (or) a specific set of boards?

Best regards,

Srinath S

0 Likes

Hi Srinath,

The issue is on both our own custom board and superspeed explorer kit CYCUSB3KIT-003.

I am thinking that the Download program is sending packets too fast for the firmware to keep up with.

If I log the packet data in my 3rd party usb app it does make the download much more likely to work.

I tried to use the FwDownloadApp but a message came up and said it needed both msvcp90.dll and msvcr90.dll

I downloaded those and then I get a runtime error R6034 attempt to load runtime library error and 0xC0000142

Thanks

Gary

0 Likes

Hi Srinath,

Eventually got the FwDownloadApp to work after installing visual studio 2008 and adding a manifest file.

Most of the time, the download works.

This is a failure that happened when trying to program the CYUSB3KIT-003.

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\application\cpp\fwdownload_fx3\x86\Debug>FwDownloadApp -i USB3_FPGA.img -t RAM

Info : Found FX3 USB BootLoader

Info : Downloading firmware image into internal RAM

Error: Firmware download failed unexpectedly with error code: FAILED

Thanks

Gary

0 Likes

Hello Gary,

- Please test using a firmware example that comes with the FX3 SDK and let me know if the error occurs.

- If possible, share the firmware image that you are using at your end.

- Is the issue specific to a particular PC/OS/host controller or does it occur across different PCs?

Best regards,

Srinath S

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Srinath,

I have tried using the default bootloader that works when I set PMODE to Z11 (serial number 0x4BE, VID = 0x4B4, PID = 0xF3)

The Control Center downloads to the RAM every time with this bootloader.

My bootloader is just a change to the 2nd Stage bootloader with new PID and VID (PMODE = Z1Z)

Now the Control Center does fail to download to RAM, unless I run my USB packet monitor program and it works.

I then noticed that the default bootloader has BCDUSB set to 0x200 while my bootloader has 0x210.

My monitor program reports them as either USB 2.0 or USB 2.1

I recompiled my program by changing gbDevDesc to be 0x200 and it now it downloads to the RAM perfectly every time!

I can now change my bootloader from using 2.0 to 2.1 and it is very consistent. Good with 2.0 and bad with 2.1

My PC is a new HP desktop with Win 10 and Intel USB 3.1 eXtnsible Host Controller - 1.10 (Microsoft)

Please see the two attached firmware image files. These are loaded into the I2C EEPROM.

Best regards,

Gary

0 Likes

Hello Gary,

- Kindly, share the firmware source corresponding to these second stage boot-loader IMG files.

Best regards,

Srinath S

0 Likes
lock attach
Attachments are accessible only for community members.

Hi Srinath,

The 200 firmware (USB 2.0) is very reliable and it has always downloaded to the RAM OK.

The 210 firmware (USB2.1) is very unreliable in downloading to RAM.

The only difference is line 29 of usb_descriptors.c

Please see the attached source code. This code was written by a previous engineer and I have taken over the project.

Best regards,

Gary

0 Likes

Hello Gary,

Both the boot firmware are found to be working fine in downloading the application firmware onto the FX3 RAM. Please let me know what application firmware are you trying to load into the FX3 RAM from the boot-loader.

EDIT: Please note that the USB 2.x version does not affect in loading the firmware into the FX3 RAM.

Best regards,

Srinath S

0 Likes