10 Replies Latest reply on Oct 31, 2019 2:25 AM by KandlaguntaR_36

    CX3 timestamp




      How can I reset the CX3 timestamp timer ?



        • 1. Re: CX3 timestamp

          CX3Timestamp - Do you mean Timer used to reset the DMA channel when the timer is up (No DMA activity)?

          • 2. Re: CX3 timestamp



            Are you talking about ITP Time Stamp Register mentioned in section 10.16.6 of FX3 TRM?


            Thanks & Regards

            • 3. Re: CX3 timestamp

              I meant the timestamp that added to each frame

              • 4. Re: CX3 timestamp

                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.

                • 5. Re: CX3 timestamp


                  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?



                  • 6. Re: CX3 timestamp

                    Please let me know what is the requirement of resetting the time stamp.

                    • 7. Re: CX3 timestamp

                      1. Can you please describe how the frame timestamp mechanism works?

                      2. What do you mean a requirement of resetting the time stamp?

                      • 8. Re: CX3 timestamp

                        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 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?

                        • 9. Re: CX3 timestamp

                          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.

                          • 10. Re: CX3 timestamp



                            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.