How ISO-TP splits a payload
A classic CAN frame carries at most 8 data bytes. ISO-TP (ISO 15765-2) is the layer that lets a message larger than that travel over CAN anyway, by breaking it into frames and reassembling it on the other end. Every frame starts with a PCI (Protocol Control Information) byte that says which of the four frame types it is and what to do with it.
PCI nibble types
Every frame starts with a PCI (Protocol Control Information) byte. Its upper nibble (half a byte, 4 bits) tells you which of the four frame types you're looking at:
| Nibble | Frame type | Lower nibble / next byte |
|---|---|---|
| 0x0 | Single Frame (SF) | Payload length (0-7) |
| 0x1 | First Frame (FF) | High bits of a 12-bit total length |
| 0x2 | Consecutive Frame (CF) | Sequence number (1-15, wraps to 0) |
| 0x3 | Flow Control (FC) | Flow status (0=CTS, 1=Wait, 2=Abort) |
Single Frame: it all fits already
If the payload is 7 bytes or less (6 with extended addressing),
it travels in one frame. The PCI byte's upper nibble is 0, the lower nibble is
the byte count. No handshake needed, nothing else to send.
First Frame: announcing a payload that won't fit
Past that size, the sender starts with a First Frame. Its PCI byte's
upper nibble is 1, but unlike the other frame types, the 12-bit total length
doesn't fit in one byte: the lower nibble holds the top 4 bits of that length, and the
entire next byte holds the remaining 8 bits. So the length header is two
bytes wide, and only the 6 bytes after it (5 with
extended addressing) are actual payload data.
Consecutive Frame: the rest of the payload
Once the receiver gives the go-ahead (see Flow Control below), the remaining payload
bytes follow in Consecutive Frames. Their PCI upper nibble is
2; the lower nibble is a sequence number that starts at 1, increments per
frame, and wraps back to 0 after 15. The receiver uses that number to detect a dropped
or duplicated frame.
Flow Control: pacing the transfer
Before any Consecutive Frame can be sent, the receiver answers the First Frame with a
Flow Control frame (PCI upper nibble 3), giving the
go-ahead and setting two pacing parameters: Block Size and
STmin.
Block Size (BS) caps how many Consecutive Frames the sender may push
before it has to stop and wait for another Flow Control. 0x00 means no cap,
send everything in one go. A nonzero value, say 1, means the receiver only
allows 1 CF per Flow Control, so the sender has to stop and wait for a new Flow Control
after every single Consecutive Frame.
STmin (Separation Time minimum) sets the minimum gap the sender must
leave between Consecutive Frames, independent of block size. 0x00-0x7F
is 0-127 ms, 0xF1-0xF9 is 100-900 µs. A slow ECU might ask for a
50 ms gap between frames to avoid getting overrun. Load one of the multi-frame examples
above, then edit the ECU FC → STmin field in the config bar yourself:
the timestamps between Consecutive Frames, and how long the whole transfer takes, will
change accordingly.