1 2 Previous Next 24 Replies Latest reply on Nov 8, 2019 5:00 AM by RashiV_61

    FX3 is not detecting in U3Z2 board

    DhN_4227681

      Hi,

       

      Previously, I booted the working code of FX3 its detecting fine . But after SPI FLASH, i booted the another FX3 code by adding GPIF 2 read and write configuration then reset the device. After reseting the FX3 is not detecting in the U3Z2 board. what may be the problem? If i add the GPIF 2 read and write is wrong?

       

      Find the attached code below, which was booted to U3Z2 board.

       

      Regards,

      Dhanuja

        • 1. Re: FX3 is not detecting in U3Z2 board
          HemanthR_06

          Hi Dhanuja,

           

          The CyFxAppErrorHandler() might be executing after the changes you have done. So, change the boot mode to USB and load your firmware with CyU3PDeviceReset(CyFalse) added in -- if (apiRetStatus != CY_U3P_SUCCESS). You can check this for latest modifications done by you (I mean to the latest APIs added).

           

          Regards,

          Hemanth

          • 2. Re: FX3 is not detecting in U3Z2 board
            DhN_4227681

            Hi,

             

            Ok, I will check the APIs.

             

            And U3Z2 board is connected via USB, but it is not detecting in control center.

             

            Regards,

            Dhanuja

            • 3. Re: FX3 is not detecting in U3Z2 board
              RashiV_61

              Hello Dhanuja,

               

              The booting of the board is from USB or SPI Flash? Please confirm

               

              Let me know the results after checking the API.

               

              Regards,

              Rashi

              • 4. Re: FX3 is not detecting in U3Z2 board
                DhN_4227681

                Hi,

                 

                The U3Z2 device is not detecting in control center itself.

                 

                The booting is done in SPI FLash only.

                 

                Find the below attachment.

                 

                Regards,

                Dhanuja

                • 5. Re: FX3 is not detecting in U3Z2 board
                  RashiV_61

                  Hello Dhanuja,

                   

                  Can you share the firmware? To help you with debugging.

                   

                  Did you try booting some default firmware from SPI Flash?

                  If not can you try programming any one of  UsbSpiRegMode/UsbSpiDmamode example into FX3 RAM and pass the vendor commands to read/write from/to Flash. You can refer to readme.txt file in the example folder. This is to check the SPI connection.

                   

                  If SPI connection is fine, you can try putting CyU3PDeviceReset(CyFalse) at different places one by one from the start of the firmware i.e. main(). This will help in debugging.

                   

                  There is possibility that some API might be failing leading to entering in the error handler (infinite loop). This can be a reason that you don't see the device in control center (or not enumerating).

                   

                  Regards,

                  Rashi

                  • 6. Re: FX3 is not detecting in U3Z2 board
                    DhN_4227681

                    Hello Rashi,

                     

                    I know the FX3 booting using SPI Flash and also i know how to erase that previous booting code.

                    But my problem is, in control center device is not detecting(i.e cypress fx3 boot loader device is not obtained in board).

                    Find the attached below and this is the previous booted code.

                     

                    Regards,

                    Dhanuja

                    • 7. Re: FX3 is not detecting in U3Z2 board
                      RashiV_61

                      Hello Dhanuja,

                       

                      I found that the error is in iomatrix configuration.

                      The pins that you are using for SPI i.e. 53,54,55,56 cannot be used as you are using them for the UART.

                       

                          io_cfg.gpioSimpleEn[0]  = 0;

                          io_cfg.gpioSimpleEn[1]  = 0x01E00000; //for spi

                       

                      If you want to use UART then you need to configure different pins for SPI.  If you don't want to use UART then you can use these pins by overriding them.

                       

                      Regards,

                      Rashi

                      • 8. Re: FX3 is not detecting in U3Z2 board
                        DhN_4227681

                        Hi,

                         

                        Now we don't want the UART pins.

                         

                        After booting, the hardware is not supporting itself, its not detecting in control center. If any change can be done in hardware.

                         

                         

                        Regards

                        Dhanuja 

                        • 9. Re: FX3 is not detecting in U3Z2 board
                          RashiV_61

                          Hello Dhanuja,

                           

                          If you don't need the UART pins.You can change the iomatrix to

                           

                              io_cfg.s0Mode = CY_U3P_SPORT_INACTIVE;

                              io_cfg.s1Mode = CY_U3P_SPORT_INACTIVE;

                             io_cfg.useUart   = CyFalse;

                              io_cfg.useI2C    = CyTrue;

                              io_cfg.useI2S    = CyFalse;

                              io_cfg.useSpi    = CyFalse;

                          #if (CY_FX_SLFIFO_GPIF_16_32BIT_CONF_SELECT == 0)

                              io_cfg.isDQ32Bit = CyFalse;

                              io_cfg.lppMode   = CY_U3P_IO_MATRIX_LPP_DEFAULT;

                          #else

                              io_cfg.isDQ32Bit = CyTrue;

                              io_cfg.lppMode   = CY_U3P_IO_MATRIX_LPP_DEFAULT;

                          #endif

                              /* No GPIOs are enabled. */

                              io_cfg.gpioSimpleEn[0]  = 0;

                              io_cfg.gpioSimpleEn[1]  = 0x01E00000; //for spi

                              io_cfg.gpioComplexEn[0] = 0;

                              io_cfg.gpioComplexEn[1] = 0;

                              status = CyU3PDeviceConfigureIOMatrix (&io_cfg);

                           

                          But i can see that you are using the UART for debugging (CyFxSlFifoApplnDebugInit) . If you make io_cfg.useUart   = CyFalse; you won't be able to get the debug prints and cannot use CyFxSlFifoApplnDebugInit in the firmware.

                           

                          If you want to get the debug prints i.e. use UART you need to change the pins that you are using for SPI i.e you cannot use pins 53,54,55 and 56 for SPI.

                           

                          Please confirm that you have stored  the firmware code in the SPI and then when FX3 is programmed with this firmware it is not seen in the Control Center. Is my understanding right? Or  without  programming FX3 with this firmware it is not seen in the control Center? Please let me know the problem.

                           

                          After booting you are not getting the device in control center (which means improper enumeration) because the device enumerates when the usb descriptors are sent to the host successfully.

                          In the firmware that you shared in your previous post, there is failure in iomatrix configuration (in the main) because of which the descriptors are not being sent.The descriptors are sent in CyFxSlFifoApplnInit function which is not called as there is error in main() function.

                           

                          If the FX3 is not enumerating without programming with this firmware the you would need to check the PMODE lines.

                           

                          Please let know if any other queries

                           

                          Regards,

                          Rashi

                          • 10. Re: FX3 is not detecting in U3Z2 board
                            DhN_4227681

                            Hi,

                             

                            Without programming FX3 in control center we can see cypress FX3 boot loader device. This will not obtained in control center.

                             

                            Previously that code was working fine, after changing the GPIF 2 configuration and booted that code and then in control center it not visible that cypress fx3 boot loader device.

                            • 11. Re: FX3 is not detecting in U3Z2 board
                              RashiV_61

                              Hello Dhanuja,

                               

                              This means after programming FX3 with your firmware it is not coming on the Control Center.

                               

                              You have two options make your firmware enumerate in the control center:

                              1) If using UART that means io_cfg.useUart   = CyTrue; You cannot use io_cfg.gpioSimpleEn[1]  = 0x01E00000; //for spi.

                              2) If you want to use 53,54,55a nd 56 pins for SPI then you cannot use UART i.e you need to make io_cfg.useUart   = CyFalse;

                              On doing so you can use UARt for debugging so you need to change the firmware accordingly. You cannot use CyFxSlFifoApplnDebugInit in your firmware.

                               

                              After booting you are not getting the device in control center (which means improper enumeration) because the device enumerates when the usb descriptors are sent to the host successfully.

                              In the firmware that you shared in your previous post, there is failure in iomatrix configuration (in the main) because of which the descriptors are not being sent.The descriptors are sent in CyFxSlFifoApplnInit function which is not called as there is error in main() function.

                               

                               

                              Regards,

                              Rashi

                               

                              • 12. Re: FX3 is not detecting in U3Z2 board
                                DhN_4227681

                                Ok, I will make the changes what u have told.

                                 

                                Thank you

                                • 13. Re: FX3 is not detecting in U3Z2 board
                                  DhN_4227681

                                  Hi,

                                   

                                  The hardware is not detecting in the control center itself, how can i check code without visible the cypress fx3 boot loader device.

                                  • 14. Re: FX3 is not detecting in U3Z2 board
                                    RashiV_61

                                    Hello Dhanuja,

                                     

                                    Please share what modifications did you do to the firmware.

                                     

                                    Also try programming with both .c files one by one (refer attachment). Check if enumeration is proper (in control center). I have tested these files at my end by replacing these files in default slavefifosync firmware. Please check the attachment.

                                     

                                    If this doesn't work, please share  your full firmware folder (not only .c file)

                                     

                                     

                                    Regards,

                                    Rashi

                                    1 2 Previous Next