SerialComm/TriggerFrameFormat (2011-04-26 09:00:54)

A high performance, flexible (but simple) CRC protected communication protocol for serial lines (like FBUS, RS232, RS485, etc...). Can also be stored in files or SDcard blocks

For the curious (developer of dataloggers, university projects, etc...)

Advantages over megatune protocol

Advantage over the AIM protocol

Advantage over SerialComm/SIPR (SIPR is a nice design, SIPR also bears the same advantages listed above)


More information is helpful especially during first startup

For example:

Now other events like commanded spark can be sent (and is actually sent since 1.1.90) in the triggerlog. Optionally ECU runtime data also. More and more information helps the installer when struggling through the first startup and verification of the setup => can save days (or weeks).


Overview

The generic format is:

HDLCbytestuffed( N*primtrig, datablock, type, CRC), 7e

0x7e is the frame marker. Anything in between the 7e markers is the HDLC bytestuffed packet.

HDLC bytestuffing is the industry standard:

Decoding is trivial (the inverse operation).

See also


Compatibility

So for now one can use the old crappy megatune command ("A" => 56 bytes unframed, or "D" that is more than 56 bytes now) or one can use the new more robust commands.

We usually try to keep old compatibility commands until the new is reasonable, stable and works. Roadmap:

Note that (since 1.1.89) the triggerframe format can also be chosen for the SD-card inodes ("files"). This allows logging very special and rare events on the SD-card (like more details about occasional intermittent trigger-problem that happens 1-2 times a day) - very useful when analyzing engine operation (without this, the installer is almost completely in the dark, the traditional error code flags provide too little info).