ISO 15765-2:2016: Large Payload Extensions
Two escape sequences that push classic ISO-TP past its original limits
Quick recap: classic ISO-TP frame headers
Before the extensions, a quick reminder of the four classic frame types and how their first byte(s) encode the frame type and length.
Single Frame (SF) - up to 7 data bytes
SF, len=3
Upper nibble 0 = SF, lower nibble = payload length. Max 7 on classic CAN, 6 with extended addressing.
First Frame (FF): 12-bit length, up to 4 095 bytes total
FF, len hi
len lo
Two-byte header: 0x1 (FF) plus a 12-bit length, max 0xFFF = 4 095.
Six data bytes ride along in the FF itself, the rest follows in Consecutive Frames.
Extension 1: CAN FD Single Frame escape (SF_DL = 0)
Classic SF stores its length in the lower nibble of the PCI byte, which caps it at 15, but only 7 bytes are ever valid on classic CAN since the rest of the byte has to be data. CAN FD frames can carry up to 64 bytes, so a single frame needed a way to carry more than 7 bytes of payload.
The fix: when the lower nibble is 0, the next byte
carries the real length instead. That's the SF escape sequence.
SF escape frame format
SF escape
length=12
Byte 0 (0x00) signals the SF escape, byte 1 (0x0C = 12) gives the
actual payload length. The remaining 12 bytes are data, padded out to the next CAN FD frame
size (16 bytes here).
Still a single frame, so no FC exchange needed.
Classic SF vs FD SF escape, same 12-byte payload
Extension 2: 32-bit First Frame escape (FF_DL = 0)
The classic FF header stores total message length in a 12-bit field, capping it at
4 095 bytes. The 2016 revision repurposes 0x000 as an escape: when
that 12-bit field reads zero, the next four bytes carry the real length as a
32-bit big-endian integer, pushing the limit out to roughly
4 GB (4 294 967 295 bytes).
10 00 plus 4 length
bytes) and still carry 2 data bytes, with the rest following in normal Consecutive Frames.
Handy for large firmware transfers over classic CAN.
32-bit FF escape frame format
FF type
escape=0
MSB
LSB
10 00 is an FF with a 12-bit length of zero, so it's escape mode. The next 4
bytes give the total length, big-endian: 0x00001388 = 5 000. Only 2 data bytes
fit in the classic CAN FF itself; the remaining 4 998 bytes follow in 714 Consecutive Frames
of 7 bytes each.
Full exchange: 5 000-byte transfer, classic CAN (BS=0, STmin=0)
SN=0xA on the last CF because 714 mod 16 = 10 = 0xA. Timing assumes
500 kbps and no STmin delay. Everything else, FC, CF structure, SN wrap-around, works exactly
like classic multi-frame.
How a receiver tells the two FF types apart
It just reads the first two bytes of the FF:
- Upper nibble
0x1with the lower 12 bits non-zero: classic FF, length is those 12 bits. - Bytes 0-1 exactly
10 00: escape FF, read the next 4 bytes as a 32-bit big-endian length. Data starts at byte 6.
Summary comparison
| Property | Classic SF | FD SF escape | Classic FF/CF | 32-bit FF escape |
|---|---|---|---|---|
| Defined in | ISO 15765-2:2003 | ISO 15765-2:2016 | ISO 15765-2:2003 | ISO 15765-2:2016 |
| PCI trigger | 0x01–0x07 |
0x00 + length byte |
0x10–0x1F, low 12 bits ≠ 0 |
0x10 0x00 + 4-byte length |
| Max payload | 7 bytes | 62 bytes (CAN FD) | 4 095 bytes | 4 294 967 295 bytes (~4 GB) |
| FC exchange needed | No | No | Yes | Yes |
| Works on classic CAN | Yes | No (pointless) | Yes | Yes |
| Works on CAN FD | Yes | Yes | Yes | Yes |
| Typical use case | Short diagnostic requests/responses | Medium responses on CAN FD ECUs | Most multi-frame UDS services | Firmware transfers, large data uploads |