-
Notifications
You must be signed in to change notification settings - Fork 6
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
Critical synchronization bug results into going back in time #48
Comments
Camera0Frame
register
More data on this bug Other sessions produce a rather weird bug where the jump in time is actually closer to 1 full second: 0 diff
Time
2487628.957536 1 0.008352
2487628.965888 1 0.008320
2487628.974208 1 0.008352
2487628.982560 1 0.008320
2487628.990880 1 -0.974720
2487628.016160 1 0.991392
2487629.007552 1 0.008320
2487629.015872 1 0.008352 I am not sure if this is the same bug or a mixture of two bugs (the one described above + non atomic update of the two time keeping registers). |
@filcarv suggested connecting a clock generator and a subordinate board. Measure both synch led outputs. Unplug the synch cable and check how long it takes to drift the heartbeat. |
@bruno-f-cruz @filcarv We also just found this on long-term data collection epochs. We've seen two different asymmetrical patterns, but essentially same features as @bruno-f-cruz described. It's interesting that this was not present in our earlier datasets. We used to have a rare bug where PWM rise times would update non-atomically but this would manifest as a jump forward in time, followed by a jump backwards in time of the same amount. It's more concerning if we have now gaps which are non-symmetric. |
Consider a rig where a FLIR camera is being externally triggered by an harp behavior board using DO0. When looking at the difference between the timestamps of adjacent frames and triggers, I get the following plot:
As you can see, while the camera operates at a steady 8.3ms per frame, two frames in >400k seem to have a lower-than-expected timestamp.
The two "faulty" frames look like:
One import point, is that the bug seems to happen around the second roll-over so I am wondering if this is a problem related with the clock synchronization. It is kinda weird that according to the camera the period remains stable but not according to the behavior board. I suspect this might be because the PWM task is running on the MCU clock and not on the Harp clock. Once the clock synchronizes (and corrects the harp clock) it results in a mis-timestamped trigger as seen by the non-linear harp clock. While this seems like an ok behavior in general if the correction of the harp timestamp is small, it seems weird that such a big gap is found (2ms) between the timestamped reported by the camera and the one reported by harp.
The text was updated successfully, but these errors were encountered: