Synchronizing Ladybug5 Cameras

Differences between FireWire and USB 3.1

For users familiar with synchronizing Firewire cameras, it is important to note that the cycle time generated in USB 3.1 behaves differently to cycle time in 1394.

While Firewire cycle time is driven by the 24.576 MHz Firewire clock, USB 3.1 is driven by the USB Isochronous Timestamp Packet (ITP). The accuracy of the ITP is determined by the host PC. The tick’s average period is 125 µs.

The CYCLE_TIME register for Ladybug5 is located at 1EA8h. The timestamp format is as follows:



Because of the inaccuracy of the USB 3.1 IPT interval, the four least significant bits of the timestamp do not accurately reflect the cycle_offset and should be discounted.

Cycle_count—increments from 0 to 7999, which equals one second.

Second_count—increments from 0 to 127.


Synchronizing Ladybug5 and the Host

Due to the limitations on the accuracy and resolution of USB 3.1 timestamps, synchronization between the Ladybug5 and the host system requires a different approach than the Firewire Ladybug3.


t = time read from CYCLE_TIMET = time read from host

1. Capture a Ladybug5 frame with embedded timestamp information. (t1)

2. Call ladybugGrabImage() to retrieve the frame.

3. Read CYCLE_TIME register immediately when ladybugGrabImage() returns. (t2)

4. Read system time immediately when ladybugGrabImage() returns. (T2)

5. Calculate the difference between t1 and t2 = Δt. This is the transmission time using CYCLE_TIME as reference.

6. Calculate the system time when shutter closes using host’s clock as reference. T2 – Δt = T1 Synchronization between the camera and the host is achieved when t1 can be matched with T1. Depending on the user’s application this synchronization process can be done repeatedly (for example, every 1 second) to keep the synchronization over extended period of time.


Testing Configuration and Results

Camera Ladybug5
Ladybug SDK
Driver pgrXHCI
Port On-board Renesas
OS Windows 7 32-bit
Pixel Format JPEG 12
Trigger Latency
  To Start of Integration
From Software Trigger ~2 ms
From Hardware Trigger 8 µs (+/- 1 µs)
Maximum Trigger Rate
  Less than 10 ms Shutter 10 ms to 20 ms Shutter
Trigger Mode 0 9 FPS 8 FPS
Trigger Mode 14 9 FPS 9 FPS
Related Articles