1 2 Previous Next 16 Replies Latest reply on Jun 15, 2020 5:58 AM by YashwantK_46

    how to get unpredictable data by FX3

    TeLe_4638221

      Hello,

       

      I am using FX3 to get the image data  but had some problem about FX3.

      I could display Image Data on PC Host application continuously

      but I didn't know how to modify source to get unpredictable data from Image sensor.

      (the image sensor send data to fpga unpredictably according to Light Source.)

       

      please let me know how to solve this problem.

       

      the project description is like below.

       

      * Structure description

      ###########################################################

      Customized Image Sensor   <->    FPGA   <->    FX3     <->    PC Host Application

      ###########################################################

      - Image sensor resolution : 3264 x 2448

      - 16bit per a pixel

      - PCLK : 81Mhz

      - parallel 32bit data from FPGA  to FX3

      - refered to AN75779 because of using UVC framework

       

      Best regards,

      Ted Lee.

        • 1. Re: how to get unpredictable data by FX3
          YashwantK_46

          Hello Ted Lee,

           

          but I didn't know how to modify source to get unpredictable data from Image sensor.

          (the image sensor send data to fpga unpredictably according to Light Source.)

          ==>Can you please confirm that you are facing the issue of incorrect data from the image sensor to FPGA -> FX3 or is just the FPGA sending data incorrectly at random times?

           

          refered to AN75779 because of using UVC framework

          --> Can you please confirm if the UVC header addition and other UVC related aspects take place in the FX3 firmware or is it done inside the FPGA?

           

          Regards,

          Yashwant

          • 2. Re: how to get unpredictable data by FX3
            TeLe_4638221

            hello, yashwantk_46

             

            Thanks for your reply.

            Please check the below..

             

            Can you please confirm that you are facing the issue of incorrect data from the image sensor to FPGA -> FX3 or is just the FPGA sending data incorrectly at random times?

             

            = >FPGA just send the received data from image sensor by 32 bit parallel data. I confirmed that.

            FX3 should dispose of(manage? deal with?) data that FPGA send randomly  and  transfer data to pc host application by UVC

            (* that's why I refered AN75779 document & sources)

             

            Can you please confirm if the UVC header addition and other UVC related aspects take place in the FX3 firmware or is it done inside the FPGA?

            => the UVC header addition and other UVC related aspects take place in the FX3 firmware not inside the FPGA

             

            Best Regards,

            Ted Lee

            • 3. Re: how to get unpredictable data by FX3
              YashwantK_46

              Hello Ted Lee,

               

              Thank you for the confirmation.

               

              Since FX3 only acts as a pass-through between the image sensor+FPGA and the host, the issue with the image sensor needs to be fixed first or the FPGA needs to handle the incorrect data since FX3 won't have the differentiating factor between the correct data and the randomly occurring unwanted data.


              Can you probe the FV, LV, and PCLK signals coming from FPGA when this unwanted data comes from the sensor and share the traces with me?

               

              You may need to contact the image sensor manufacturer and get assistance from them on correcting the unpredictable random data coming from the sensor first.

               

              Regards,
              Yashwant

              • 4. Re: how to get unpredictable data by FX3
                TeLe_4638221

                Hello,

                 

                Thanks for your help..

                 

                I might not explained well about this situation but let me try in this way again.

                 

                Usually "FX3" shows me "several" frames based on streaming in the regular patterns of time.

                But I am wondering if it is possible to get "ONLY ONE" frame (sent by image sensor) "randomly" at ONCE without STREAMING so that it can deliver the frame to PC screen directly.

                 

                best regards,

                Ted Lee

                • 5. Re: how to get unpredictable data by FX3
                  YashwantK_46

                  Hello Ted Lee,

                   

                  Please refer to the following KBA: DMA Channel in Override Mode in FX3/CX3 - KBA229098

                   

                  You can get only one frame and then stop streaming for a certain delay or until an input or interrupt is generated to signal the incoming data using the CyU3PDmaChannelSetXfer() API by defining the frame size in the second parameter.
                  Once certain number of bytes are received by the FX3, the DMA channel will stop streaming until you call the CyU3PDmaChannelSetXfer() API again with the required number of bytes.
                  You will either have to implement a logic in the firmware or add a predefined delay or use an interrupt to signal FX3 of the incoming data and call the API again to receive the frame.

                   

                  Regards,
                  Yashwant

                  • 6. Re: how to get unpredictable data by FX3
                    TeLe_4638221

                    Hello, Yashwant

                     

                     

                    Thank you for your Help.

                     

                    So How can I get  generated interrupt signal? Is there any Example sources?

                    (**I am using 32bit parallel data signal from FPGA to FX3)

                     

                    please let me know about that.

                     

                     

                    best regards,

                    Ted Lee

                    • 7. Re: how to get unpredictable data by FX3
                      YashwantK_46

                      Hello Ted Lee,

                       

                      Please refer to 2.4.2.3 Hardware Trigger Interrupts in the following UVC spec: http://www.cajunbot.com/wiki/images/8/85/USB_Video_Class_1.1.pdf

                       

                      The above section refers to the Still Image Capture function supported by UVC to enable capturing a frame from the incoming stream.

                       

                      The firmware with the Still Capture Implementation has been given in the following thread: CX3: How to capture UVC triggered still image from Windows Host Application


                      Please take a look and see if this can work out for your application.

                       

                       

                      Regards,

                      Yashwant

                      • 8. Re: how to get unpredictable data by FX3
                        TeLe_4638221

                        Hello,

                         

                        Thanks for your Supports.!!

                        I followed the link  - CX3: How to capture UVC triggered still image from Windows Host Application

                         

                        Device Driver detected FX3 both external device & Camera

                        (please refer the below images)

                         

                        I am wondering if it is matter or not

                        please let me know some advice.

                         

                        thanks

                         

                        Best Regards,

                        Ted Lee

                         

                         

                        fx3_3.jpgfx3_2.jpgfx3_1.jpg

                        • 9. Re: how to get unpredictable data by FX3
                          YashwantK_46

                          Hello Ted Lee,

                           

                          This is not expected and the device should only enumerate as FX3 with a single interface under Camera.

                           

                          Please let me know the changes/ modifications that you have done to the firmware.
                          Please let me know if you have modified your project according to the above-mentioned thread or used the firmware attached in the above-mentioned thread?

                           

                          Regards,
                          Yashwant

                          • 10. Re: how to get unpredictable data by FX3
                            TeLe_4638221

                            Hello Yashwant,

                             

                            I modified the source like below

                            please check the attached files.

                             

                            1. cyfxuvcdscr.c

                            2. uvc.c

                            3. uvc.h

                             

                            thanks

                             

                            Best Regards,

                            Ted Lee

                            • 11. Re: how to get unpredictable data by FX3
                              YashwantK_46

                              Hello Ted Lee,


                              1.) In cyfxuvcdscr.c, the interface number for the #else needs to be set to 0x02 as follows:

                               

                              Please change this and see if you notice any change in the device manager.

                               

                              Regards,
                              Yashwant

                              • 12. Re: how to get unpredictable data by FX3
                                TeLe_4638221

                                hello,

                                 

                                thanks for your reply

                                unfortunately, It didn't work it...

                                 

                                I am sorry that system language.

                                but, it means that "Don't recognize the USB Device(wrong composition description)?"

                                 

                                not working.jpg

                                 

                                thanks

                                 

                                Best Regards,

                                Ted Lee

                                • 13. Re: how to get unpredictable data by FX3
                                  TeLe_4638221

                                  Hello,

                                   

                                  I attached the project and document for you to understand that.

                                  please check the sources and let me know how to fix it

                                   

                                  thanks

                                   

                                  Best regards,

                                  Ted Lee

                                  • 14. Re: how to get unpredictable data by FX3
                                    YashwantK_46

                                    Hello Ted Lee,


                                    Thanks for sharing the firmware.

                                     

                                    After going through the firmware, I understand that you added a vendor interface as a means to have the still capture trigger (0x88) in firmware.


                                    Please undo the change i mentioned in my response 11 and keep the interface number = 0x03.

                                     

                                    Now, the image shared in response 8 makes sense and the other interface is a vendor interface that needs to be binded to any vendor specific driver manually.
                                    You can also bind the interface to CyUSB driver and use it as a vendor interface by binding it to the driver located in the location: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\driver\bin

                                    You can select a driver according to your OS and OS architecture (32 or 64-bit) from the above folder.

                                     

                                    The process of manually binding the cyusb3.sys driver to the interface is as follows:

                                    1.) Right click on FX3 under 'Other devices' section of Device Manager and choose 'Update Driver Software'.

                                    2.) In the pop-up window, choose 'Browse my computer for driver software'.

                                    3.) Choose 'Let me pick from a list of device drivers on my computer'.

                                    4.) Choose 'Show All Devices' and click Next.

                                    5.) Click on 'Have Disk...'

                                    6.) In the pop-up window, choose 'Browse...' and go to the following location: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\driver\bin ( select the OS and whether x64 or x86)

                                    7.) Choose "cyusb3.inf" and click Okay.

                                     

                                    This will make the device enumerate again with a vendor interface and you can use control center to send the vendor command you want.

                                     

                                     

                                    Regards,
                                    Yashwant

                                    1 2 Previous Next