7 Replies Latest reply on May 25, 2018 4:51 PM by joexing_2705076

    Why device reset is not identical to hard reset for Cypress FX3?

    joexing_2705076

      Currently we are testing data capture with Cypress FX3, via customized firmware slavefifosync and host application streamer. Generally we may get 15.9MB/s throughput, but when the streamer doesn't run fast enough or other reason, we need to reset FX3 board. Following FX3 TRM document, call CyU3PDeviceReset(CyFalse), FX3 board can return to bootloader mode, we may load firmware again. But FX3 only can run 8MB/s, then drop data quickly. Hard reset manually always can recover FX3  board to normal status.

      Do anyone know what else operation is needed to do before device reset? Appreciate any suggestion.

       

      Thanks,

      Joe

        • 1. Re: Why device reset is not identical to hard reset for Cypress FX3?
          srdr

          CyU3PDeviceReset(CyFalse) will take device to Bootloader mode.

          Device boots the firmware again and start running the firmware.

          Instead, Implement the soft reset as described in this thread Implementation of Soft Reset in FX3 family devices .

          This does not boot the firmware again.

           

          Check the throughput with this implementation.

          • 2. Re: Why device reset is not identical to hard reset for Cypress FX3?
            abga

            When you do hard reset manually, does it reset the external processor, which is pumping the data to GPIF of FX3?

            • 3. Re: Why device reset is not identical to hard reset for Cypress FX3?
              joexing_2705076

              There is a button connected to "RESET" Pin of chip CYUSB3014. It can always clear the issue. For device reset, call CyU3PDeviceReset(CyFalse) to take device to Bootloader mode, then device boot and start running the firmware. The whole process looks good. But the streamer function can't work well at a 50 percent probability. So it is not identical to the hard reset

              • 4. Re: Why device reset is not identical to hard reset for Cypress FX3?
                srdr

                Joe Xing,

                 

                We have tried to re-create the issue here in the following way. Attached the modified GpifToUsb Firmware.

                1. Created a timer for 10 seconds in GPIFtoUsb example project

                2. In the timer call back, we are calling CyU3PDeviceReset(CyFalse) API

                 

                Functionality testing:

                1. Load the firmware to I2C EEPROM and set the PMODE to Z1Z

                2. Open the streamer application

                3. Start streamer after the device enumeration and observe the throughput

                4. it will stop streaming after 10 seconds, because the timer is expired

                5. Since the Boot option is I2C EEPROM and fallback to USB bootloader mode, the device re-enumerates and appears in the control center and streamer

                6. Start the streamer immediate after the device enumeration and again observe the throughput

                7. We have not seen any reduction in the throughput number

                 

                Based on this experiment we have a few questions:

                 

                1. You mentioined that you wanted to do device reset whenever there was a reduction in throughput or some other reason. So we would like to know when exactly you trigger the soft reset (based on what event)

                 

                2. Is the HARD RESET (button) connected to Master (connected to Slave FIFO)?

                 

                3. Check whether there are any PIB errors, when there is reduction in the throughput

                 

                4. As per your statement "But the streamer function can't work well at a 50 percent probability", the streamer is showing the correct throughput half number of times. Is it true?

                • 5. Re: Why device reset is not identical to hard reset for Cypress FX3?
                  joexing_2705076

                  Answers are as below:

                  Q1.

                  We modify the firmware slavefifosync to capture data from GPIO to FX3.

                  1. Add code in CyFxSlFifoApplnUSBSetupCB function in cyfxslfifosync.c

                      if (bType == CY_U3P_USB_VENDOR_RQT)
                      {

                          switch (bRequest)
                          {
                              case 0xC9: // CY_FX_RQT_RESET:
                                  CyU3PDeviceReset(CyFalse);
                                  break;

                         ...

                  Q2.

                      HARD RESET(button) is connect to nRESET pin of CYUSB3014.

                  Q3.

                  No PIB errors observed in debug port.

                  We modify epType to ISO in CyFxSlFifoApplnStart in cyfxslfifosync.c(line 190). Later we find there is no problem in BULK mode

                      epCfg.epType = CY_U3P_USB_EP_ISO; // reduction in the throughput

                      //epCfg.epType = CY_U3P_USB_EP_BULK; // normal

                  Q4.

                  For epType ISO mode, soft reset can't work well, reduction in the throughput happens almost every time. But hard reset works well.

                  • 6. Re: Why device reset is not identical to hard reset for Cypress FX3?
                    srdr

                    In ISOC mode, are you sure that whether the vendor command is received by the device.

                    Put a Debug Print in the vendor command before calling the CyU3pDeviceReset API and confirm.

                     

                    As per the description, it looks like some times DeviceReset working well in ISOC mode but some time it fails. Isn't it?

                    • 7. Re: Why device reset is not identical to hard reset for Cypress FX3?
                      joexing_2705076

                      Yes, I am very sure that vendor command is received because FX3 goes back to boot loader mode.

                      So DeviceReset doesn't work well in ISOC mode sometimes. It is not always true that device reset is identical to hard reset, described in the manual.