ISO-TP CAN Frame Calculator
Split diagnostic or application payloads into ISO-TP CAN frames, calculate Single Frame, First Frame and Consecutive Frame PCI bytes, inspect sequence numbers and estimate separation timing. You can also decode an individual ISO-TP CAN frame including Flow Control parameters.
| # | Frame Type | Sequence | PCI | Payload | CAN Data Bytes |
|---|
—
What Is ISO-TP on CAN?
ISO-TP, commonly associated with ISO 15765-2, is a transport protocol used to carry messages that may be larger than the payload of a single CAN data frame. It is widely encountered in automotive diagnostics and other CAN-based systems.
ISO-TP adds Protocol Control Information, or PCI, to the CAN data field so the receiver can determine whether a message is a Single Frame or part of a multi-frame transfer.
ISO-TP Frame Types
| PCI Type | High Nibble | Purpose |
|---|---|---|
| Single Frame | 0x0 | Complete short message |
| First Frame | 0x1 | Starts a multi-frame message |
| Consecutive Frame | 0x2 | Continues payload data |
| Flow Control | 0x3 | Controls sender pacing |
ISO-TP Single Frame
With the conventional Classical CAN layout, the first data byte contains the Single Frame PCI and payload length. This leaves seven bytes for application data.
Payload:
22 F1 90
Payload Length:
3 bytes
PCI:
03
CAN Data:
03 22 F1 90 00 00 00 00ISO-TP First Frame
When the payload is longer than the Single Frame capacity, the transfer begins with a First Frame. The conventional First Frame uses two PCI bytes and carries the first six payload bytes.
Payload Length:
17 decimal
= 0x011
First Frame PCI:
10 11
First Frame:
10 11 [first 6 payload bytes]ISO-TP Consecutive Frames
After the First Frame and appropriate Flow Control, the remaining data is sent using Consecutive Frames. The first byte is the PCI and the remaining seven bytes can contain payload data.
Consecutive Frame PCI:
21 = Sequence 1
22 = Sequence 2
23 = Sequence 3
...
2F = Sequence 15
20 = Sequence 0
Sequence numbers wrap modulo 16.How Many ISO-TP Frames Are Required?
For Classical CAN:
If payload ≤ 7 bytes:
Total Frames = 1
If payload > 7 bytes:
First Frame carries 6 bytes.
Remaining =
Payload Length - 6
Consecutive Frames =
ceil(Remaining / 7)
Total Frames =
1 + Consecutive FramesISO-TP Flow Control Frame
A Flow Control frame tells the sender whether it may continue transmitting and provides pacing parameters such as Block Size and STmin.
Example:
30 00 05
30 = Flow Control / Continue To Send
00 = Block Size 0
05 = STmin 5 msFlow Status Values
| FS | Meaning |
|---|---|
| 0 | Continue To Send (CTS) |
| 1 | Wait |
| 2 | Overflow / Abort |
ISO-TP Block Size
Block Size defines how many Consecutive Frames the sender may transmit before it must wait for another Flow Control frame. A Block Size of zero allows the remaining Consecutive Frames to be sent without another block boundary imposed by that Flow Control message.
ISO-TP STmin
STmin specifies the minimum separation time requested between Consecutive
Frames. Values from 0x00 through 0x7F represent
milliseconds. The encoded values 0xF1 through 0xF9
represent 100 through 900 microseconds.
0x00 = 0 ms
0x05 = 5 ms
0x7F = 127 ms
0xF1 = 100 µs
0xF5 = 500 µs
0xF9 = 900 µsISO-TP Sequence Number
Each Consecutive Frame contains a four-bit Sequence Number. The first CF after the First Frame normally uses sequence number 1. The value increments for each following CF and wraps after 15 back to 0.
CF sequence:
1, 2, 3, ... 14, 15, 0, 1, 2 ...Example: 20-Byte ISO-TP Payload
Payload:
20 bytes
First Frame Payload:
6 bytes
Remaining:
20 - 6 = 14 bytes
CF Capacity:
7 bytes
Consecutive Frames:
14 / 7 = 2
Total:
1 First Frame + 2 CF
= 3 CAN framesISO-TP CAN Frame Calculator FAQs
What does ISO-TP mean?
How much data fits in a Classical CAN ISO-TP Single Frame?
How much payload fits in the First Frame?
How much data fits in each Consecutive Frame?
What does ISO-TP sequence number 0 mean?
What does Block Size 0 mean?
What does STmin 0x05 mean?
What does STmin 0xF5 mean?
Does this calculator include CAN arbitration and bus transmission time?
Does ISO-TP use CAN IDs?
Calculate ISO-TP CAN Message Segmentation
Split payload bytes into ISO-TP Single, First and Consecutive Frames, inspect PCI values and sequence numbers, or decode an individual transport frame and its Flow Control parameters.