10 Replies Latest reply on Jun 26, 2019 7:39 AM by MiRo_263836

    :  CYUSB4357-BZXC - Problem loading firmware

    MiRo_263836

      I have a customer who is having issues loading firmware. 

      =================================

      I am trying to load the firmware image onto the Hub. I have tried both using the configuration utility software as well as loading the image to the eeprom first. I can successfully load the image onto the eeprom but it has not successfully loaded the image onto the Hub. When using the configuration utility and checking the log on dock_update.txt I get the following message.
      "Loading composite dock image
      CreateFile failed. Error: 32
      Loading composite dock image file failed"

      Can you provide more information about Error 32?

      ======================================

      Thank you for your help in advance.

      Mike Roberts

        • 1. Re: :  CYUSB4357-BZXC - Problem loading firmware
          MuthuM_11

          Hi Mike,

           

          How the customer tried loading the image to the EEPROM first? Did he/she use external SPI flash programmer?

           

          >> I can successfully load the image onto the eeprom but it has not successfully loaded the image onto the Hub.

          How the customer confirm that hub didn't take the image loaded?

           

          Error code 32 is related to sharing violation of the file. Please refer below:

          System Error Codes (0-499) - Windows applications | Microsoft Docs

           

          Please make sure following:

          (1) composite bin file is not opened by any other tools

          (2) HX3PD Configuration Utility has a known issue that when you run the tool without connecting the device, it opens the file, but doesn't close it. As a workaround, please close the tool and open again and try

           

          Regards,

          Muthu

          2 of 2 people found this helpful
          • 2. Re: :  CYUSB4357-BZXC - Problem loading firmware
            MiRo_263836

            **************************************************************************************************************************************************************

            How did they try loading the image to the EEPROM first? Did they use external SPI flash programmer?
            Yes we used an external SPI flash programmer. I verified the image programmed correctly to the EEPROM.

            How the customer confirm that hub didn't take the image loaded?

            I tested the board that I programmed the EEPROM against one which I did not and on both boards the hub behaves the same. The picture from usbview that I included in the last message shows what I see from both when connecting the US port to my PC. I also snooped on the SPI signals coming out of the Hub for both boards. I did notice odd behavior on the SPI_CLK and SPI_SS on both boards. When I bring the Hub out of reset, SPI_SS goes low then back high twice in quick succession and then remains high. I see the exact same behavior on SPI_CLK.
            ***********************************************************************************************

             

            Attached is an screenshot of the USB View

            • 3. Re: :  CYUSB4357-BZXC - Problem loading firmware
              MuthuM_11

              Hi Mike,

               

              The usbview snapshot you provided is for DMC (Dock Management Controller) device within HX3PD.

              Can you take the usbview of USB hub?

               

              If the SPI activity is for a less amount of time, then probably hub wouldn't have booted the FW from SPI flash.

               

              Did you make your own board? If so, did you follow hardware design guideline for HX3PD? Can you share the schematic?

               

              Regards,

              Muthu

              • 4. Re: :  CYUSB4357-BZXC - Problem loading firmware
                MiRo_263836

                Question: "If the SPI activity is for a less amount of time, then probably hub wouldn't have booted the FW from SPI flash."
                Answer:
                    Agreed, I have provided two oscilloscope screenshots of the SPI activity coming from the Hub.
                The first "SPI1.tif" shows the SPI_SS and SPI_CLK signals. As you can see SPI_SS is only low for a short amount of time. Around 3.5us before going back high and it does this twice. During these low periods, the CLK is running and appears to be behaving properly. Once SPI_SS goes back high however, SPI_CLK stops. This short amount of activity is not nearly enough time for the Hub to interface with EEPROM and read the FW loaded onto it.
                The second image "SPI2.tif" shows SPI_SS over a long period of time, as you can see after the 2 low pulses, the signal slowly goes from high to low over a long period of time. We see the same activity on the SPI signals when we power up or when we put the Hub controller into reset and then bring it out.

                Question:    "Did you make your own board? If so, did you follow hardware design guideline for HX3PD? Can you share the schematic?"
                Answer:
                   Yes we made our own board. We did follow the hardware design guidelines as much as possible to fit our application. We do have external control over RESET_HUB, XRES_PD and XRES_DMC so that we can ensure the power supplies are stable before pulling it out of reset.  It does take about 6ms instead of the recommended 3-5ms for the +1.2V rail to come up after the +3.3V rail but I wouldn't think that would have a big impact and cause the issues on the SPI lines that I have seen. When it comes to power supplies the only big difference is that on pins V5P0 (P.E7), V5P0_P0 (P.C4) and V5P0_P1 (P.D7) we are supplying all 3 on the same +5V rail and not utilizing individual power switches for  V5P0_P0  and V5P0_P1. But at the same time we aren't using VCONN/EMCAs at the moment either.

                I am open to suggestions or ideas if you have any.

                • 5. Re: :  CYUSB4357-BZXC - Problem loading firmware
                  MiRo_263836

                  These are the scope views

                  • 6. Re: :  CYUSB4357-BZXC - Problem loading firmware
                    MuthuM_11

                    Hi Mike,

                     

                    From the SPI trace, it looks like FW is not read from SPI for booting. Probably, due to not valid FW on SPI flash.

                     

                    (1) When you said, you used external SPI flash programmer to program the SPI flash, which FW binary did you use for programming the SPI flash? You shouldn't use "CYUSB4347-BZXC_FW.bin" from the package on the web for programming to SPI flash.

                    (2) When you use USB based FW update using "HX3PD Configuration Utility", did it succeed? Can you share the log? Can you share the output of status query script "HX3PD_Status_Query_Script.bat"?

                    (3) Which SPI flash do you have on your design? Is it MX25V2035FM1I? What's the capacity of the SPI flash?

                     

                    Regards,

                    Muthu

                    • 7. Re: :  CYUSB4357-BZXC - Problem loading firmware
                      MiRo_263836

                      Can you attach an example file that would work?  That would verify that they can program the flash correctly.

                      • 8. Re: :  CYUSB4357-BZXC - Problem loading firmware
                        MiRo_263836

                        (1) When you said, you used external SPI flash programmer to program the SPI flash, which FW binary did you use for programming the SPI flash? You shouldn't use "CYUSB4347-BZXC_FW.bin" from the package on the web for programming to SPI flash.

                        I did use the CYUSB4347-BZXC_FW Bin from the package on the web to program the EEPROM. If that is not the appropriate FW bin, where should I get the correct one?

                        (2) When you use USB based FW update using "HX3PD Configuration Utility", did it succeed? Can you share the log? Can you share the output of status query script "HX3PD_Status_Query_Script.bat"?

                        The HX3PD Configuration Utility did not succeed. It states that it "
                        Failed to connect device, HX3PD firmware update failed" in the output box at the bottom of the configuration utility.

                        "dock_update.txt" outputs
                        Loading composite dock image
                        Connecting to the DMC
                        Device not found
                        Connecting device failed

                        HX3PD_Status_Query_Script.bat" outputs
                        @echo off
                        setlocal
                        echo Querying HX3PD Hub status . . .
                        echo.
                        ezpd_dockupdatefw.exe -vid 04B4 -pid 521B -v -l v
                        echo.
                        pause
                        @echo on

                        (3) Which SPI flash do you have on your design? Is it MX25V2035FM1I? What's the capacity of the SPI flash?

                        I am using W25X40CL, it is 4M-bit.


                        The usbview snapshot you provided is for DMC (Dock Management Controller) device within HX3PD.
                        Can you take the usbview of USB hub?


                        I have attached the usbview_hub.png it is a screenshot of the hub.

                        • 9. Re: :  CYUSB4357-BZXC - Problem loading firmware
                          MuthuM_11

                          Hi Mike,

                           

                          (1) Please contact Cypress Technical Support to get the hub FW.

                          Firmware Update and Configuration of HX3PD Type-C Hub - KBA225228

                           

                          (2) Looks like driver binding to DMC did not succeed. Please launch device manager (by running devmgmt.msc in Run) and double click on the "Dock Management Controller" device to open the properties.

                           

                          (3) We recommend to use MX25V2035FM1I with the current version of silicon & FW. In future version of the FW, we will support Winbond SPI flash as well.

                           

                          (4) Hub did not load FW from SPI flash.

                           

                          Regards,

                          Muthu

                          • 10. Re: :  CYUSB4357-BZXC - Problem loading firmware
                            MiRo_263836

                            I am very confused now.

                             

                            You say

                            " You shouldn't use "CYUSB4347-BZXC_FW.bin" from the package on the web for programming to SPI flash."

                             

                            but KBA225228 says to use it.

                            "The firmware binary CYUSB4347-BZXC_FW.bin is placed in the ‘Firmware’ folder. Choose the ‘Update firmware’ tab in the utility and provide the firmware binary path in the ‘Composite Image’ field."

                             

                            You say to contact Cypress Technical Support for the file, but I thought that you are Cypress Technical Support.

                             

                            Do you mean that the CYUSB4347-BZXC_FW.bin can only be used with the H3PD Configuration Utility and I have to ask Cypress Tech Support for the file that will work without the utility?