Performance and Error Handling

In this chapter of the documentation, we would explain performance and timing requirements for UDS communication and how they are supposed to be handled by UDS entities.

CAN specific

Performance

ISO standards defines following time values on the network layer of UDS on CAN communication:

Diagnostic on CAN timings

Network layer time values (N_As, N_Ar, N_Bs, N_Br, N_Cs, N_Cr) present during UDS on CAN communication.

Note

The example uses segmented diagnostic message transmission as all CAN timings values can be presented there (all these times are applicable in this case). For unsegmented diagnostic message transmission though, the only applicable time parameter is N_As.

N_As

N_As is a time parameter related to transmission of any CAN Packet by a sender. It is measured from the beginning of the CAN Frame (that carries such CAN Packet) transmission till the reception of a confirmation that this CAN Frame was received by a receiver.

Timeout value:

1000 ms

Error handling:

If N_As timeout is exceeded, then the transmission of the diagnostic message shall be aborted.

Affected CAN Packets:

N_Ar

N_Ar is a time parameter related to transmission of any CAN Packet by a receiver. It is measured from the beginning of the CAN Frame (that carries such CAN Packet) transmission till the reception of a confirmation that this CAN Frame was received by a sender.

Timeout value:

1000 ms

Error handling:

If N_Ar timeout is exceeded, then the reception of the diagnostic message shall be aborted.

Affected CAN Packets:

N_Bs

N_Bs is a time parameter related to Flow Control (CAN Packet) reception by a sender. It is measured from the end of the last CAN Packet transmission (either transmitted First Frame, Consecutive Frame or received Flow Control), till the reception of Flow Control.

Timeout value:

1000 ms

Error handling:

If N_Bs timeout is exceeded, then the reception of the diagnostic message shall be aborted.

Affected CAN Packets:

N_Br

N_Br is a time parameter related to Flow Control (CAN Packet) transmission by a receiver. It is measured from the end of the last CAN Packet transmission (either received First Frame, Consecutive Frame or transmitted Flow Control), till the start of Flow Control transmission.

Performance requirement:

A receiving entity is obliged to transmit Flow Control packet before value of N_Br achieves maximal value threshold.

[N_Br] + [N_Ar] < 0.9 * [N_Bs timeout]
[N_Br max] = 900ms - [N_Ar]
Affected CAN Packets:

N_Cs

N_Cs is a time parameter related to Consecutive Frame (CAN Packet) transmission by a sender. It is measured from the end of the last CAN Packet transmission (either received Flow Control or transmitted Consecutive Frame), till the start of Consecutive Frame transmission.

Performance requirement:

A sending entity is obliged to transmit Consecutive Frame packet before value of N_Cs achieves maximal value threshold.

[N_Cs] + [N_As] < 0.9 * [N_Cr timeout]
[N_Cs max] = 900ms - [N_As]
Affected CAN Packets:

N_Cr

N_Cr is a time parameter related to Consecutive Frame (CAN Packet) reception by a receiver. It is measured from the end of the last CAN Packet transmission (either transmitted Flow Control or received Consecutive Frame), till the reception of Consecutive Frame.

Timeout value:

1000 ms

Error handling:

If N_Cr timeout is exceeded, then the reception of the diagnostic message shall be aborted.

Affected CAN Packets:

Unexpected Packet handling

According to ISO 15765-2:2016:

As a general rule, arrival of an unexpected N_PDU from any node shall be ignored, with the exception of SF N_PDUs and physically addressed FF N_PDUs; functionally addressed FirstFrames shall be ignored. When the specified action is to ignore an unexpected N_PDU, this means that the network layer shall not notify the upper layers of its arrival.

Depending on the network layer design decision to support full- or half-duplex communication, the interpretation of “unexpected” differs: a) with half-duplex, point-to-point communication between two nodes is only possible in one direction at a time; b) with full-duplex, point-to-point communication between two nodes is possible in both directions at once.

Half-duplex

Half-duplex means that only one UDS message (in one direction) can be transmitted at a time. That means that each node has up to one role (either sender or receiver) at any time.

Handling of unexpected CAN packets in case of half-duplex communication:

Status

Single Frame

First Frame

Consecutive Frame

Flow Control

Unknown

Idle

Process the Single Frame

as the start of

a new message.

Process the First Frame

as the start of

a new message.

Ignore

Ignore

Ignore

Segmented

message

transmission

in progress

Ignore

Ignore

Ignore

Ignore

Ignore

Segmented

message

reception

in progress

Terminate the current

message reception

and process

the Single Frame

as the start of

a new message.

Terminate the current

message reception and

process the First Frame

as the start of

a new message.

If awaited,

then process

the Consecutive Frame

in the on-going

reception and perform

required checks

(e.g. Sequence Number

in order).

Otherwise, ignore it.

Ignore

Ignore

Full-duplex

Full-duplex means that UDS messages can be transmitted in both directions at once. That means that a node could be sender of one UDS message and receiver of another one at the same time.

Handling of unexpected CAN packets in case of full-duplex communication:

Status

Single Frame

First Frame

Consecutive Frame

Flow Control

Unknown

Idle

Process the Single Frame

as the start of

a new message.

Process the First Frame

as the start of

a new message.

Ignore

Ignore

Ignore

Segmented

message

transmission

in progress

If a message reception

is in progress then see

the corresponding cell

in the row below.

Otherwise, process

the Single Frame as

the start of

a new message.

If a message reception

is in progress then see

the corresponding cell

in the row below.

Otherwise, process

the First Frame as

the start of

a new message.

If a message reception

is in progress then see

the corresponding cell

in the row below.

Otherwise, ignore it.

Ignore

Ignore

Segmented

message

reception

in progress

Terminate the current

message reception and

process the Single

Frame as the start

of a new message.

Terminate the current

message reception and

process the First Frame

as the start of

a new message.

If awaited, then

process the Consecutive

Frame in the on-going

reception and perform

required checks (e.g.

Sequence Number in

order).

Otherwise, ignore it.

Ignore

Ignore