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

USB superspeed peripherals Forum Discussions

rossihwang
Level 3
Level 3
5 questions asked 50 sign-ins 25 replies posted

Hi, community

I've read this thread https://community.infineon.com/t5/USB-superspeed-peripherals/How-to-fill-in-the-timestamp-of-UVC-pay..., but still have confusions on the implement

  • PTS: As the UVC 1.5 spec mentioned "The source clock time in native device clock units when the raw frame capture". How to get the time on the capture begins exactly? Via monitoring the state of the GPIF SM?

  • STC: "STC must be captured when the first video data of a video frame is put on the USB bus".  is it the timestamp when the first packet of the frame is committed to the USB bus?
  • 1KHz SOF token counter: Should I just use the lower 11bit of the glFrameCount?

Regards

Rossi

 

0 Likes
5 Replies
JiangJing
Moderator
Moderator
Moderator
25 solutions authored 50 replies posted 50 sign-ins

Hi,

      1, You can use CyU3PGetTime() API to fill the time stamp field. But there are few limitations, the timer gets increment for every 1 ms,  so , for getting 0.1us timestamp, you can use  CyU3PGpioComplexSampleNow API. (https://community.infineon.com/t5/Knowledge-Base-Articles/How-to-Get-a-0-1-%C2%B5s-Unit-Timestamp-wi...)

 

0 Likes

Hi

thanks for your reply, I also read this thread. But the main problem is not how to access the timestamp, but figuring out the definition of these three objects.

Regards

Rossi

0 Likes
rossihwang
Level 3
Level 3
5 questions asked 50 sign-ins 25 replies posted

@Rashi_Vatsa could you help me😀

0 Likes
JiangJing
Moderator
Moderator
Moderator
25 solutions authored 50 replies posted 50 sign-ins

Hi,

PTS: The source clock time in native device clock units when the raw frame capture begins
>> The frame start can be detected in the DMA callback when the first CY_U3P_DMA_CB_PROD_EVENT is triggered for the frame.
CyU3PGetTime can be used to get the time in the dma callback.

STC: "STC must be captured when the first video data of a video frame is put on the USB bus".
>> Yes, time when the first commit of the frame is done can be taken here.

1KHz SOF token counter: Should I just use the lower 11bit of the glFrameCount?
>> glframeCount is incremented when the frame ends indicating that the 1 frame is sent.
For this, I think (glFrameCount + 1) will be the actual frame count that is being sent on USB.

0 Likes

Thanks, JIangJIng

I will have a try soon.

Regards

Rossi

0 Likes