tucuxi.org: software engineering, photography and troubleshooting

Network Services - Diagnostics on CAN

ISO15765-2 is a specification produced by ISO to define a standard network-layer protocol for manufacturer enhanced diagnostics on CAN. Put simply, the network layer defined in 15765-2 allows a frame of 0-4095 bytes to be sent over CAN in a standard manner between two peers on a CAN bus. The underlying CAN specification, ISO 11898, is also available from ISO, but the specifications aren't cheap.

Please note that this document is in no way normative or a formal specification - merely a summary of the protocol for those attempting to dive into. No warranty is expressly given or implied - use the ISO specs for a normative reference if you're attempting to create an implementation or decode the protocol.

Note: This page will deal only with the normal addressing form of ISO15765-2.

Overview

The protocol described in ISO15765-2 defines a method for a payload to be sent between two peers on a CAN bus where the payload is larger than a single CAN frame (8 bytes). The protocol allows for a payload between 0 and 4095 bytes, and operates on a positive flow control mechanism - that is, the receiver must send a flow control frame in order for the sender to transmit a payload frame beyond the first frame.

Firstly, the sender of the payload will transmit a "First Frame" to the receiver. This frame specifies a 12-bit data length, alongside the first 6 bytes of the payload.

Upon receipt of the First Frame, the receiver will send a Flow Control frame to the sender. This frame will specify 3 bytes of flow control information - the first byte contains a flow status value - Continue To Send (CTS), Wait (WT), or Overflow (OVFLW). The latter condition is a fatal condition, and may only be sent in the first reply, and the former two conditions determine whether a sender will continue to originate frames with the payload. The second byte contains the number of consecutive frames that may be transmitted by the sender without a flow control reply, and the third byte specifies the minimum frame separation time.

Once a successful CTS flow control frame is received from the receiver, the sender will originate a number of Consecutive Frames, each containing a single byte sequence number, and 7 bytes of payload. These frames must be sent no faster than the minimum separation time specified in the Flow Control response.

Upon receipt of all the Consecutive Frames expected, the receiver will acknowledge transmission with a further Flow Control frame.

This process continues until the sender has originated the entire contents of the message.

Please note that there is no retry strategy within this network transport protocol.

tucuxi.org content is copyright © 2001-2007.

social network