CX3Timestamp - Do you mean Timer used to reset the DMA channel when the timer is up (No DMA activity)?
Are you talking about ITP Time Stamp Register mentioned in section 10.16.6 of FX3 TRM?
Thanks & Regards
I meant the timestamp that added to each frame
Do you mean the time stamp that you see on USB data sent over the USB Bus?
If yes, please let us know what is the requirement to reset the timer.
The requirement is when the CX3 get interrupt from external GPIO pin then it do timestamp reset.
Whether the CX3 GPIO can be used as interrupt?
Please let me know what is the requirement of resetting the time stamp.
1. Can you please describe how the frame timestamp mechanism works?
2. What do you mean a requirement of resetting the time stamp?
In the UVC example FW (An75779 and OV5640 example firmware), we have not used any time stamp fields (dwPresentationTime and dwSourceClock - extended feilds of payload header ) in the UVC Payload header. We are passing zeros to all the fields.
static uint8_t glUVCHeader[CX3_UVC_HEADER_LENGTH] =
0x0C, /* Header Length */
0x8C, /* Bit field header field */
0x00,0x00,0x00,0x00, /* Presentation time stamp field */
0x00,0x00,0x00,0x00,0x00,0x00 /* Source clock reference field */
As per the UVC 1.5 Spec., section 22.214.171.124 Video and Still Image Payload Headers, there are dwPresentationTime and dwSourceClock fields to mark the presentation time stamp and Source reference clock. These are mandatory in the following case:
- The device has multiple video and/or audio source functions and is sending audio and video streams to the host.
- The video and/or audio streams are interrelated and therefore need to be kept synchronized.
- The stream format in use does not already contain timestamp and clock reference information (MPEG-2 TS is an example of a format that contains this information).
- The sample is part of a video frame (and not a still image frame).
Can you please confirm whether it is mandatory in your case?
The following is mandatory in the our case:
- The video streams are interrelated and therefore need to be kept synchronized.
We have two CX3 that connected to usb Hub, each CX3 is connected to sensor and therefore we need to synchronized the timestamp between the two CX3.
Changed the timer incrementing value to 1ms from 10 ms.
Typically, In CX3/FX3, the timer gets increment for every 1 ms - called a timer tick.
If you use CyU3PGetTime API to get the timer tick, it will give the number of ticks from the start of the OS.
For example, if you are streaming 30 fps, one frame takes 33.33 ms.
In this case, timer ticks update 10 ms, 20ms and 30ms and 40 ms. Hence, you cannot capture time 33.33 ms.
Therefore, you don't get proper time stamp for synchronization in CX3/FX3.
You can use CyU3PGetTime and CyU3PSetTime to get and set the timer tick. Please refer API guide for usage of the APIs.