5 Replies Latest reply on Mar 2, 2017 9:50 PM by nishanta_46

    UVC with 32bit data width


      hi i'm change an75779 example into 32bit data width


      the device is emulated and data is transfered about few package then stoped (capture by bus hound) the fx3 program is runing "tx_thread_schedule" & "tx_thread_system_suspend" threads


      but 8bit/16bit firmware works fine




      then i change my program into uvc + slavefifo from "FX3 firmware for streaming UVC Data from an FPGA" this post


      i found the flaga and flagb didnt change when i try to write data into fifo. i checked all ping is fine (rd/oe/pktend are high addr/wr/cs are low)




      what the problem should be?

        • 1. Re: UVC with 32bit data width

          We can discuss one by one


          1) a) Did you make sure the the sensor was sending the data? or did it stop sending? 


          b) Next you can check for producer event in the DMA callback to see if the FX3 is receiving the data


          c) enable uart to see whether any API is failed which could have caused this scenario. Please specifically check for CyU3PDmaMultiChannelCommitBuffer API


          d) enable PIB callback and check if you get any blackflow/overrun on the GPIF port




          2) Please probe the status of the flags. Make sure that the FX3 is receiving the data. It may happen that the control signal from the FPGA is not proper, because of which the GPIF is not going into the read data state (hence no data sampled and no change in flag behavior). Check for producer event in the DMA callback to make sure of this.

          • 2. Re: UVC with 32bit data width

            hi nishant


             i figure out the reason


            1) the translate data is too fast that and my pc is too slow to transfer data


            2)my fpga didnt transfer UVC header to fifo that my the problem is


            I try to add uvc header in CyFxUVCApplinDmaCallback function, when buffer is full add a header frame when cs is high add a header eof


            buffer full is fine but the system cannot fine cs is high can you give some ideas about how to fine end of frame package and add header of it ?


            here is my function in attchment

            • 3. Re: UVC with 32bit data width

              We have provided the way to add the correct headers in the AN75779 firmware. You need to have the handle of the buffer before you add the headers. Once  we get the handle, we just commit it with adding the header. When the buffer is full, we need to add standard header. When the buffer is partial, we add EOF (because the partial buffer will come only at the end of frame).  Please refer to the CyFxUvcApplnDmaCallback function on uvc.c file in AN75779 firmware. 

              • 4. Re: UVC with 32bit data width

                hi i got transfer successfully but the software didnt recognized my data


                pic is normal transfer 


                pic 1is transfer stable data (0xaa805580)




                the uvc header is right and package number shouldbe fine(159+1 package of 16384 bytes is same with 1280x1024x2byte)


                what should be the problem?

                • 5. Re: UVC with 32bit data width

                  Small clarification: which issue are you talking about #1 ior #2? Who is adding the headers (FX3 or FPGA)? The headers needs to be added every buffer. Please note that the normal header and the End of Frame (EOF) header is different. The last buffer is expected to have a different header to indicate the host that this is the last payload of data of current frame. (have you taken care that the last buffer is have EOF header)? We have done this in the AN75779. 


                  I see the resolution is 1280*1024*2. What is your DMA buffer size. Is it 16384? If so, you need to know that actual image data is (16384 -12/16 bytes): if we consider the header/footer. So, the number of buffers for one complete frame would be like 1280*1024*2/ (buffer -16: if you add using FX3) which is more than 160.X. I suppose you are not getting the last buffer which might not be full (partial).Please note this last buffer should have EOF header.  Please share your firmware as well. Also, tell us who is adding the header and what is the logic behind it.