IceCube display
LED display to show IceCube event data
Display synchronisation

Nominally, the display consumes frame from its internal queue at 25 frames per second.

When the device is connected to a USB host, it can also track the timer interval corresponding to 40ms. To achieve this synchronisation, new_sof_received() should be called every (few) SOF token(s). The number of clock ticks between these calls will be monitored and averaged out to slave the 25FPS timer to the USB SOF timer.

Timing correction

Using the correct_display_frame_counter() and correct_display_frame_phase() functions, all display segments can be made to update within 1ms from each other. These phase corrections can be performed remotely by sending a FRAME_DRAW_SYNC request to the control endpoint. Note that tearing can still occur if no mechanism is present to tell the segments when the remotely rendered data should be displayed.

Todo:
A USB UVC-like interface should be implemented for displays consisting of multiple segments to prevent frame tearing.