1.1 CAN-TP Overview

What is CAN-TP:

CAN-TP is the Transport Layer for data communication over a Controller Area Network(CAN) bus. CAN communication was primarily designed to be utilized in an automotive setting and due to its robustness has found usage in other domains as well. Like other Transport Protocols it handles message fragmentation and assembly. CAN-TP utilizes CAN/CAN-FD packets to manage larger messages between nodes. CAN-TP also handles synchronization between the sending and receiving nodes to ensure the packets can be interpreted and received correctly. CAN-TP handles this by utilizing different frame types to manage portions of the message to send over CAN/CAN-FD. For Example: when a message exceeds the data length of a CAN/CAN-FD packet, it is split into separate frames which are sent then reassembled on the receiving node.

The frames used by CAN-TP are defined as Single Frame, First Frame, Consecutive Frame and Flow Control. The frame size is relative to the CAN/CAN-FD packet size. For frames being sent using CAN this will be limited to 8-bytes. When a message can be fit into a single CAN packet CAN-TP will use a Single Frame. Single Frame will contain the entire message and send that over the CAN bus. If the message exceeds the CAN packets size the message will be split up similar to the flow diagram below. CAN-TP will first use a First Frame which contains the size of the message and the first portion of the message. This frame would then be followed by receiving a Flow Control Frame to synchronize the sending and receiving nodes. Then utilizing Consecutive Frames, the next portions of the message will be sent. The number of Consecutive frames to be sent before another Flow Control Frame is required is determined by the Block size defined by CAN-TP. In the flow diagram below, two Consecutive Frames are sent then a new Flow Control Frame is sent to update its status with the sender. The main difference in behavior when CAN-TP utilizes CAN-FD over CAN Classic is that the the data length and speed the message are increased over the CAN bus.

Figure 1: Example CAN-TP message over a CAN bus.

Overview and additional information on message types:

  • Single Frame is used when the message can be sent over one frame without the need to split the message.

  • First Frame is the frame that defines the message size and first piece of data in a message(mainly used when the message is split up)

  • Consecutive Frame is the continuation of the data that will be assembled to make the full message. There could be any number of these until the message is fully assembled.

  • Flow Control is a frame sent from the receiver of the message to the sender to specify time between Consecutive Frames as well as the number of those frames to send before a Flow Control will be sent again. This frame also determines if the receiver is ready for the message.

Figure 2: CAN-TP frame types in-depth example.

CAN-TP Configurations:

  • Message ID – this is the ID from sender to receiver.

  • Data Length – this is the frame size that CAN-TP will use when sending a message over the CAN bus.

  • Separation Time - Utilized in the First Frame to handle message synchronization.

  • Block Size - number of Consecutive Frames to expect before another Flow Control.

Reference to the ISO 15765-2: https://www.iso.org/standard/66574.html