Home Learning Paths ECU Lab Assessments Interview Preparation Arena Pricing Log In Sign Up

ISO-TP Frame Types (ISO 15765-2)

ISO-TP Frame Type PCI Byte Layout
  Single Frame (SF):    PCI[7:4]=0, PCI[3:0]=DL (data length 1-7)
  ┌──────┬────────────────────────────────────────────────┐
  │ PCI  │ Data (1-7 bytes)                                │
  └──────┴────────────────────────────────────────────────┘

  First Frame (FF):     PCI[7:4]=1, PCI[3:0]+Byte1 = DL (8-4095)
  ┌──────┬──────┬────────────────────────────────────────┐
  │ PCI  │ DL   │ Data (6 bytes)                          │
  └──────┴──────┴────────────────────────────────────────┘

  Consecutive Frame (CF): PCI[7:4]=2, PCI[3:0]=SN (0-15, wraps)
  ┌──────┬────────────────────────────────────────────────┐
  │ PCI  │ Data (7 bytes)                                  │
  └──────┴────────────────────────────────────────────────┘

  Flow Control (FC):    PCI[7:4]=3, PCI[3:0]=FS (0=CTS,1=Wait,2=Overflow)
  ┌──────┬──────┬────────────────────────────────────────┐
  │ PCI  │ BS   │ STmin                                   │
  └──────┴──────┴────────────────────────────────────────┘
Frame TypePCI NibbleMax DataUsed For
Single Frame (SF)0x0N7 bytes (CAN 2.0)Short UDS requests/responses (ReadByIdentifier)
First Frame (FF)0x1N4095 bytesFirst segment of multi-frame message
Consecutive Frame (CF)0x2N7 bytes per CFSubsequent segments (SN 1–15, then wraps to 0)
Flow Control (FC)0x3NReceiver controls sender rate: CTS / Wait / Overflow

Flow Control Parameters: BS and STmin

Hexisotp_flow_control_trace.txt
/* ISO-TP trace: ECU requests VIN (17 bytes) via UDS SID 0x22 */

/* 1. Tester sends Single Frame UDS request (fits in 8 bytes) */
Tester → ECU: 02 22 F1 90 00 00 00 00
              ^^ PCI=SF, DL=2 bytes
                 ^^^^^ UDS SID 0x22 ReadByIdentifier
                       ^^^^^ DID 0xF190 = VIN

/* 2. ECU responds with First Frame (17 byte VIN + 3 UDS overhead = 20 bytes) */
ECU → Tester: 10 14 62 F1 90 31 47 31
              ^^^^ PCI=FF, DL=0x0014=20 bytes
                   ^^  UDS positive response 0x62
                      ^^^^^ DID echo 0xF190
                            ^^^^^^^^ VIN bytes 1-3 "1G1"

/* 3. Tester sends Flow Control: ContinueToSend, BS=0, STmin=0 */
Tester → ECU: 30 00 00 00 00 00 00 00
              ^^ PCI=FC, FS=0 (ContinueToSend)
                 ^^ BS=0: no block boundary, send all CFs
                    ^^ STmin=0: minimum separation (send as fast as possible)

/* 4. ECU sends Consecutive Frames */
ECU → Tester: 21 43 4D 31 42 32 33 34   /* CF SN=1, VIN bytes 4-10 */
ECU → Tester: 22 35 36 37 38 39 30 00   /* CF SN=2, VIN bytes 11-17 */
STmin ValueMinimum Separation Time
0x00As fast as possible (no delay)
0x01–0x7F1–127 ms (1 ms per count)
0xF1–0xF9100–900 µs (100 µs per count) — for CAN-FD high-speed diagnostic
0x80–0xF0, 0xFA–0xFFReserved — treat as 127 ms

N_Bs and N_Cr Timeouts

TimeoutDirectionDefaultExpiry Action
N_AsSender (any frame Tx)1000 msCancel transmission; N_USData.confirm(E_NOT_OK)
N_ArReceiver (FC frame Tx)1000 msCancel reception; N_USData.indication(E_NOT_OK)
N_BsSender awaiting FC after FF1000 msAbort; DoCAN timeout — common OBD scan-tool issue
N_BrReceiver (time between FF and sending FC)0 msStart FC immediately after FF receipt
N_CsSender (time between CFs when STmin=0)0 msSend CF back-to-back
N_CrReceiver awaiting next CF150 msAbort; N_USData.indication(E_NOT_OK)

AUTOSAR CanTp Configuration

XMLCanTp_NSdu_Config.arxml


  CanTpChannel_0
  
    CanTpRxNSdu_UDS_Physical
    STANDARD_29BIT
    0x18DA00F1  
    0          
    0    
    0        
    150      
    1000     
    FALSE
    
  

Summary

ISO-TP layers multi-byte messages over CAN's 8-byte maximum via SF/FF/CF/FC framing. The Flow Control frame gives the receiver full control over transmission rate (BS block size and STmin separation). N_Bs (sender waiting for FC) is the most common timeout in diagnostics — OBD scan-tools expect the ECU to respond within 150 ms per ISO 15031-3; ensure CanTp N_Bs matches or is tighter than the scan-tool's expectation.

🔬 Deep Dive — Core Concepts Expanded

This section builds on the foundational concepts covered above with additional technical depth, edge cases, and configuration nuances that separate competent engineers from experts. When working on production ECU projects, the details covered here are the ones most commonly responsible for integration delays and late-phase defects.

Key principles to reinforce:

  • Configuration over coding: In AUTOSAR and automotive middleware environments, correctness is largely determined by ARXML configuration, not application code. A correctly implemented algorithm can produce wrong results due to a single misconfigured parameter.
  • Traceability as a first-class concern: Every configuration decision should be traceable to a requirement, safety goal, or architecture decision. Undocumented configuration choices are a common source of regression defects when ECUs are updated.
  • Cross-module dependencies: In tightly integrated automotive software stacks, changing one module's configuration often requires corresponding updates in dependent modules. Always perform a dependency impact analysis before submitting configuration changes.

🏭 How This Topic Appears in Production Projects

  • Project integration phase: The concepts covered in this lesson are most commonly encountered during ECU integration testing — when multiple software components from different teams are combined for the first time. Issues that were invisible in unit tests frequently surface at this stage.
  • Supplier/OEM interface: This is a topic that frequently appears in technical discussions between Tier-1 ECU suppliers and OEM system integrators. Engineers who can speak fluently about these details earn credibility and are often brought into critical design review meetings.
  • Automotive tool ecosystem: Vector CANoe/CANalyzer, dSPACE tools, and ETAS INCA are the standard tools used to validate and measure the correct behaviour of the systems described in this lesson. Familiarity with these tools alongside the conceptual knowledge dramatically accelerates debugging in real projects.

⚠️ Common Mistakes and How to Avoid Them

  1. Assuming default configuration is correct: Automotive software tools ship with default configurations that are designed to compile and link, not to meet project-specific requirements. Every configuration parameter needs to be consciously set. 'It compiled' is not the same as 'it is correctly configured'.
  2. Skipping documentation of configuration rationale: In a 3-year ECU project with team turnover, undocumented configuration choices become tribal knowledge that disappears when engineers leave. Document why a parameter is set to a specific value, not just what it is set to.
  3. Testing only the happy path: Automotive ECUs must behave correctly under fault conditions, voltage variations, and communication errors. Always test the error handling paths as rigorously as the nominal operation. Many production escapes originate in untested error branches.
  4. Version mismatches between teams: In a multi-team project, the BSW team, SWC team, and system integration team may use different versions of the same ARXML file. Version management of all ARXML files in a shared repository is mandatory, not optional.

📊 Industry Note

Engineers who master both the theoretical concepts and the practical toolchain skills covered in this course are among the most sought-after professionals in the automotive software industry. The combination of AUTOSAR standards knowledge, safety engineering understanding, and hands-on configuration experience commands premium salaries at OEMs and Tier-1 suppliers globally.

← PreviousNetwork Management (NM) over CANNext →Hands-On: CAN-FD Communication Setup