Transport Protocol (ISO 15765-2 / CAN-TP)
The 8-Byte Problem
A standard CAN frame carries maximum 8 bytes. Many use cases need more:
- UDS diagnostics: responses may return 50+ bytes
- ECU flashing: firmware images are megabytes
- DTC snapshot data: can exceed 100 bytes
- Certificate exchange: hundreds of bytes
ISO 15765-2 (CAN-TP / ISO-TP) defines segmentation and reassembly on top of CAN.
The Four ISO-TP Frame Types
| Frame Type | PCI Byte | Purpose |
|---|---|---|
| Single Frame (SF) | 0x0N | Complete message in one frame (max 7 bytes) |
| First Frame (FF) | 0x1N NN | First segment + total length |
| Consecutive Frame (CF) | 0x2N | Subsequent segments (sequence 0–F, wraps) |
| Flow Control (FC) | 0x3N | Receiver tells sender: block size, min gap |
Multi-Frame Transfer Example
Diagnostic tester requests VIN (17 characters):
| Step | Direction | Frame | Data (hex) | Explanation |
|---|---|---|---|---|
| 1 | Tester → ECU | SF | 03 22 F1 90 | ReadDataByIdentifier (0x22), DID=0xF190 |
| 2 | ECU → Tester | FF | 10 14 62 F1 90 57 | Total length=20 bytes, positive response, first VIN byte |
| 3 | Tester → ECU | FC | 30 00 0A | Continue, no block limit, 10 ms min gap |
| 4 | ECU → Tester | CF | 21 42 41 47 47 53 31 | Consecutive Frame #1 |
| 5 | ECU → Tester | CF | 22 32 47 50 30 30 31 | Consecutive Frame #2 |
| 6 | ECU → Tester | CF | 23 32 33 34 35 00 00 | Consecutive Frame #3 (padded) |
Flow Control Parameters
- Block Size (BS): How many CFs before waiting for another FC. BS=0 means send everything.
- Separation Time (STmin): Minimum gap between CFs. 0x01–0x7F = 1–127 ms, 0xF1–0xF9 = 100–900 µs.
Common Mistake: Setting STmin too low causes buffer overflows in slow receivers. If you see intermittent "Transfer Aborted" errors during flashing, increase STmin first.
Exercise: Capture a UDS diagnostic session with multiple DTCs. Identify FF, FC, and CF frames. Verify the sequence counter increments correctly.