CAN Timestamping

The MTTCAN module provides a 16-bit timestamp counter to timestamp received CAN packets in the hardware. At the start of each CAN frame reception, it captures the TSC counter [24-9] bits and stores it alongside the CAN frame. In order to overcome the limitation of 16-bit timestamp, deduce all of the 64 bits of captured timestamp while processing the CAN frame in the interrupt handler. This hardware timestamp is provided to the application using the SocketCAN interface.

Use the candump util to dump the hardware timestamp for each received CAN packet:

# candump -ta can0 &