32-bit values with 56-bit timestamps don’t work well with CAN 2.0. They don’t work well at all. Because we don’t fit into one CAN 2.0 frame, we’d have to spill over into another frame, adding two more bytes for CRC. So the overhead would be: 7 bytes timestamp, 2 tail bytes, 4 CRC bytes; the total overhead amounts to 13 bytes for just a single 4-byte float. Uh oh.
I realize that we aren’t supposed to care about efficiency but I’m not sure we’re supposed to not care to such a wild extent.
Kjetil has pointed this out at the today’s call and so we ended up adding SynchronizedAmbiguousTimestamp
, 24 bits wide, with an overflow interval of 16 seconds. Which is bad, because overflowing timestamps are dangerous, especially those that overflow every 16 seconds.
So, let’s consider for a second dropping the resolution of ambiguous timestamps down to, say, 10 microseconds. This is bad because of this:
But 16-second overflow period is also bad, so we have to decide which is worse. Given these new developments, I am inclined to accept timestamps with 10 us per LSB.