cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

KeWa_2323766
New Contributor II

On page 64 of  document 001-75779 Rev. *K, section 9 : Connecting Two Image sensors,  the last paragraph says  "

"As shown in the connection diagram, Frame Valid 2, Line Valid 2, and PCLK 2 signals are connected to FX3, but they
are not utilized by the GPIF II block because the image sensors are assumed to be synchronized. These signals are
connected to FX3 so it can monitor the signals to check the accuracy of the synchronization between the image sensors
during debug and development" 

Now I found a  problem that most likely is due to two sensor out of sync.  Thus, I would like to know how to modify firmware to check delay between Frame Valid 1 and Frame Valid 2, Line Valid 1 and Line Valid 2, and PCLK 1 and PCLK 2? 

Thank you in advance. 

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator

Hello,

To check the time difference between two Frame valid on FX3, you can use a different firmware like gpioApp from the FX3 SDK and configure two GPIO to which the frame valid signals are connected. In the GPIO configuration, register for CY_U3P_GPIO_INTR_POS_EDGE interrupt for both the GPIO. On getting the interrupt, use CyU3PGetTime to get the OS timer ticks when interrupts associated with both GPIO is triggered.

Please note that the minimum OS timer tick value is 1ms so if the difference between both frame valid is <1ms then  How to Get a 0.1-µs Unit Timestamp with FX3 – KBA2... - Cypress Developer Community  KBA can used to get timestamp with lower resolution.

The time difference between two interrupts can be printed through UART using CyU3PDebugPrint API in the thread entry function

Regards,
Rashi

View solution in original post

0 Likes
3 Replies
Rashi_Vatsa
Moderator
Moderator

Hello,

The GPIF state machine of AN75779 uses a single pair of FV and LV lines.

If two sensors are connected and to check if the sensors are out of sync, you can probe both the pairs of FV, LV and PCLK pins using a scope and confirm. This will be faster and easier way to check if the sensors are synchronized.

Regards,
Rashi
0 Likes
KeWa_2323766
New Contributor II

Rashi,

Thank you for your reply.

I did find some phase shift between  Frame Valid 1 and Frame Valid 2 using oscilloscope. I would like to use FX3 to read back these phase shift.  i.e. Measuring delay between pulse on two CTL pins.

0 Likes
Rashi_Vatsa
Moderator
Moderator

Hello,

To check the time difference between two Frame valid on FX3, you can use a different firmware like gpioApp from the FX3 SDK and configure two GPIO to which the frame valid signals are connected. In the GPIO configuration, register for CY_U3P_GPIO_INTR_POS_EDGE interrupt for both the GPIO. On getting the interrupt, use CyU3PGetTime to get the OS timer ticks when interrupts associated with both GPIO is triggered.

Please note that the minimum OS timer tick value is 1ms so if the difference between both frame valid is <1ms then  How to Get a 0.1-µs Unit Timestamp with FX3 – KBA2... - Cypress Developer Community  KBA can used to get timestamp with lower resolution.

The time difference between two interrupts can be printed through UART using CyU3PDebugPrint API in the thread entry function

Regards,
Rashi

View solution in original post

0 Likes