Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb: device: gs_usb: make capturing hardware timestamp on sof optional #14

Conversation

henrikbrixandersen
Copy link
Member

Make the capturing of hardware timestamps on USB Start of Frame (SoF) events optional and disable it by default.

Capturing the hardware timestamp on SoF improves the accuracy of the time synchronization between the USB host and the device (in the range of ~110 to 20 microseconds depending on the board according to my measurements), but comes with a cost of much higher CPU load.

This does not affect the relative timestamping of CAN RX/TX frames, only their absolute timestamp as compared to the USB host time.

Make the capturing of hardware timestamps on USB Start of Frame (SoF)
events optional and disable it by default.

Capturing the hardware timestamp on SoF improves the accuracy of the time
synchronization between the USB host and the device (in the range of ~110
to 20 microseconds depending on the board according to my measurements),
but comes with a cost of much higher CPU load.

This does not affect the relative timestamping of CAN RX/TX frames, only
their absolute timestamp as compared to the USB host time.

Signed-off-by: Henrik Brix Andersen <[email protected]>
@henrikbrixandersen henrikbrixandersen merged commit 92db3f3 into CANnectivity:main Sep 4, 2024
4 checks passed
@henrikbrixandersen henrikbrixandersen deleted the make_hardware_timestamp_on_sof_optional branch September 4, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant