FX3 UVC streaming stop after tens of seconds.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
rohoc_3075686
Level 1
Level 1

       I have an FX3 board and an FPGA board.  The FX3 design is an 1920x1080@60Hz UVC design in YUV2 format. The FPGA sends video data to FX3 through the slavefifo 32bit interface at 100Mhz. The video is actually from an HDMI input to FPGA.

       In the FX3 FW, the DMA buffer size is set to 32KB, 4 buffers. The size of the UVC payload is 32KB. The FX3 SDK version is 1.3.3.

       The Windows can find the UVC device and the video software, like AMCap, VirtualDub, VLC, can open the UVC device and show the video correctly. But after tens of seconds, the video halts.

       Using the Device Monitoring Studio to capture the USB packages between PC and FX3, the final package to FX3 is to request 32KB data from FX3, but there's no data back from FX3. I have no idea why there's no response from the FX3. I can see from the FPGA the slavefifo is full in such situation.

       After I restart the soft, it can show the video again.

       And I also run the slavefifo and streamer example in the SKD, there's no such issue.

       I have no idea what happen to the FX3 and I don't know how to debug such issue?

       Could it be HW issue?  Any ideas for such issue? Thanks.

0 Likes
1 Solution

Hi Ronnie,

Could you please try to use Manual DMA channel and then check the UART debug logs. This will give us some idea of the error. You mentioned that the slavefifo buffers are full when the stall condition arrives so I suspect that it might be facing CommitBuffer error.

Thanks & Regards
Abhinav

View solution in original post

0 Likes
5 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

- Please share the USB traffic between PC and FX3.

- In case your hardware has got access to the UART ports, please use debug statements to identify if there is any failure in API calls.

Best regards,

Srinath S

0 Likes
lock attach
Attachments are accessible only for community members.

Dear Srinath:

       Please see the attached picture. 

       You can see 2 types of usb packets, the 32896-byte packet is the packet with 32KB video payload from FX3, while the 128-byte is the PC request to FX3.

       You can see the last USB packet to FX3 is a 128-byte packet. Before it everything seems ok.

       The FX3 stream halts here. No packets after that.

       For the FX3 FW,  auto DMA mode is used, so there's no API called during the streaming I guess.

       There's no error message from the UART, too. Therefore the AbortHandler function is never called.

       The PibCallBack is configed, but there's no error related to PIB_INTR_ERROR, too.

      

       So how to see more debug messages? Thanks!

       

       

      

0 Likes

Hi Ronnie,

Could you please try to use Manual DMA channel and then check the UART debug logs. This will give us some idea of the error. You mentioned that the slavefifo buffers are full when the stall condition arrives so I suspect that it might be facing CommitBuffer error.

Thanks & Regards
Abhinav

0 Likes

Hi, Abhinav:

        Thanks!

        In fact I used Manual DMA channel before, but found no error in the UART output.

        The DMA notification is set to CY_U3P_DMA_CB_PROD_EVENT.

        In the DMA callback function, the callcack type is check.

        If the type is CY_U3P_DMA_CB_PROD_EVENT, then CyU3PDmaChannelCommitBuffer is called. After the call, the call status is check, if it is not CY_U3P_SUCCESS, an error message will be printed out to UART by calling the CyU3PDebugPrint. But there's no error message from the UART when the video stream halts.

        So I still don't know what's the problem.

     

BR

Ronnie      

0 Likes

Are you getting gpifCounter and frame counter values in debug logs? Is there any difference in frameCounter and GpifCounter values? Are you getting any debug logs over UART?

Thanks & Regards
Abhinav

0 Likes