Comments on Evaluating CAN logging systems.
When trying to log all the CAN messages, the challenges are greater than when
logging just a hardware-filtered subset of the messages, but the principles are the same.
apacheguy said:
Gary,
I've been conversing with the developer of this Pi 2 shield:
PiCAN2 CAN-Bus Board for Raspberry Pi 2 [RSP-PICAN2] - £26.90 : SK Pang Electronics, Arduino, Sparkfun, GPS, GSM
Basically we're trying to determine if this board will work in the Model S. From what I gather, CAN3 puts out about 2,000 frames/sec at 500 Kbps. The developer informs me that this is very close to the limit of what this device can process without buffer overflow. He did, however, ask me to get him some solid data from a CAN analyzer so he can tell me for sure. Unfortunately, I do not have such a device, but I suspect that you likely do. Would you be willing to provide precise measurements from an analyzer that I can pass along to the developer?
Thanks,
Eric
I do not have a CAN3 log or a real CAN3 analyzer.
However, maybe the developer can better describe his constraints.
Usually handling 3 or 4 messages with no gaps between them is the first
hurdle. Next is buffering bursts of perhaps 3000 per second, and
then the limitations of getting data written to a file.
I found in writing to a flash device that typical writes could go
quite fast, but occasionally there would be large delays, like 700 ms,
that required a very large buffer.
Then, when there IS a buffer overflow, how is it handled?
I counted the missed messages and inserted a pseudo-CAN
error message into the data stream that contained the number
of missed messages.
Can he inhibit the generation of the Recieve ACK bit, if needed ...
but this might not be important, at least in most cases.
How does he handle termination, and is there provision to
handle single-sided CAN signals?
Find out how he is handling these problems.
Then, he should be able to test by generating messages
on one Pi and receiving on another.
Is he able to capture more than one CAN bus simultaneously?
Does he time stamp each message with second and millisecond
that it was received?
Does he add Date-and-Time pseudo-CAN messages at the start
of each new minute?
Can the log files hold something like 40 million messages,
to allow logging for at least 2, possibly 3 hours?
We think that 2 CAN buses in the Tesla are 500k, two are 125k, and
a hidden one is 33.33k (the Pilot). Is there an easy option
to select the bit rate, or an auto-baud setting?
Cheers, Gary