11 Replies Latest reply on Dec 9, 2019 9:27 PM by haxu_299926

    CX3 GPIFII modify

    haxu_299926

      Hello,

             I want to get the point of the frame start , at the moment , I want to send one package by CPU,and then use the dma send data,how can I get it? Wherher the GPIFII state machine can be modified?

        • 1. Re: CX3 GPIFII modify
          HemanthR_06

          Hi,

           

          You can use CyCx3UvcAppAddHeader() in the cx3 firmware to add a special byte to first buffer of a new frame.

           

          Regards,

          Hemanth

          • 2. Re: CX3 GPIFII modify
            haxu_299926

            Hello,

             

                  I want to one independent buffer to send the header,the CyCx3UvcAppAddHeader() function add the leader with the image data buffer, not use an independent buffer.I want when the !FV->FV,I can commit the header,and when the FV->!FV,I can commit the leader,such as the example of U3V_on_Fx3.Re: FX3 application note for USB3 Vision

            Re: The GPIF II module customization for cx3 ,this  community says that you can modfiy the gpif state machine,is it really?and what should I provide for you ?

            • 3. Re: CX3 GPIFII modify
              HemanthR_06

              Hi,

               

              Your requirement can be achieved using override mode. Please refer to the below community thread:

              cx3 use overridemode

              Refer to Cypress response on Nov 22. Have a look at Project Cx3UvcOV5640.rar

              CyU3PDmaMultiChannelSetupSendBuffer() API is used to commit the buffer which is independent of the allocated DMA buffers for the channel. In that example, an independent buffer is sent at the end of every frame.

               

              Regards,

              Hemanth

              • 4. Re: CX3 GPIFII modify
                haxu_299926

                Hello,

                 

                     At the end of the frame,stop the sensor and send a trailer is no problem,but I still want to send at the begin of the frame,and the start and stop the sensor and the state machine will affect the acquisition frame rate of sensor .

                    I still want to modfiy the gpif state machine,Can you realize it?

                • 5. Re: CX3 GPIFII modify
                  haxu_299926

                  Hello,

                   

                       At the end of the frame,stop the sensor and send a trailer is no problem,but I still want to send at the begin of the frame,and the start and stop the sensor and the state machine will affect the acquisition frame rate of sensor .

                      I still want to modfiy the gpif state machine,Can you realize it?

                  • 6. Re: CX3 GPIFII modify
                    HemanthR_06

                    Hi,

                     

                    At the end of the frame, after you send trailer, can you also send the header without waiting for frame start? And regarding the project shared, you need not stop and start the sensor, you can instead stop the state machine and restart.

                     

                    Regards,

                    Hemanth

                    • 7. Re: CX3 GPIFII modify
                      haxu_299926

                      Hi,

                       

                            I used the dma override mode for send the leader and trailer ,and this the ov5640 sensor can only run 35fps,the reset dma channel will need 20ms, We can't receive the time 20ms. so we still want to modify the gpif statemachine.The CX3 gpif statemachine is unsuited for u3vision.

                      • 8. Re: CX3 GPIFII modify
                        HemanthR_06

                        Hi,

                         

                        Please try the following and me know the results.

                        When you call CyU3PDmaMultiChannelSetXfer(), currently you are passing 0 as the second argument. Can you pass exact frame size in bytes as the argument instead? - By doing so, after finishing one frame, before calling CyU3PDmaMultiChannelSetupSendBuffer() DMA channel reset is not required.

                        Can you please test it and let me know the result?

                         

                        Regards,

                        Hemanth

                        • 9. Re: CX3 GPIFII modify
                          haxu_299926

                          Hi,

                                What shoud I pass to the the second argument of CyU3PDmaMultiChannelSetXfer()?The image size?Then When dma channel have be sent the set value,it can calling CyU3PDmaMultiChannelSetupSendBuffer() without DMA channel reset ? CyU3PDmaMultiChannelSetupSendBuffer should be called in the configured state.

                                 I test it ,and CyU3PDmaMultiChannelSetupSendBuffer() will return the error code 0x47 .

                          Regards,

                          • 10. Re: CX3 GPIFII modify
                            HemanthR_06

                            Hi,

                             

                            yes, pass the image size as the second argument. After the image is transferred, dma channel will go to configured state. If the second parameter is 0, then dma channel will be in active state always, and you cannot call CyU3PDmaMultiChannelSetupSendBuffer().

                             

                            The sequence I am talking about is:

                            1. Call CyU3PDmaMultiChannelSetXfer() with image size as second parameter

                            2. Wait till the entire frame is transferred.

                            3. Now, the channel is expected to be in configured state. - You can use CyU3PDmaMultiChannelGetStatus() to check the same.

                            4. Now call CyU3PDmaMultiChannelSetupSendBuffer().

                             

                            Regards,

                            Hemanth

                            • 11. Re: CX3 GPIFII modify
                              haxu_299926

                              Hi,

                                      The test results: after sending a frame of data, it stops. The tail packet is not sent out. Querying DMA channel status has not been configured.I still want to modify the gpif statemachine,please Tell me directly whether I can modify GPIF state machine