Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

There is a synchronisation problem between system time and CAN Data timestamp (ncRead).

I send a frame to a CAN device with ID X, and I am supposed to receive an answer from this device with ID Y.
Before sending the data with ID X, I get the system time (GetSystemTimeAsFileTime).
When I read the queue of received data from ID Y, I compare the timestamp of received frame with my system time, to check if it is newer.

I notice a big gap (more than 15s) between those two times, though the answer has been received in a very short time.

The time base of the CAN driver, and the time base of the PC system doesn't seem to be synchronized.

How can I fix this problem?

Thank you in advance.
0 Kudos
Message 1 of 2
(4,140 Views)
Here's some programs to test this issue. I didn't see any delay under Windows 98. Attached is the c file that I used.

Randy Solomonson
Applications Engineer
National Instruments
Download All
0 Kudos
Message 2 of 2
(4,140 Views)