J1939 Documentation
Version 4.16.00
|
CAN is based on a broadcast communication mechanism. This broadcast communication is achieved by using a message oriented transmission protocol. These messages are identified by using a message identifier. The message identifier has to be unique within the whole network and it defines not only the content but also the priority of the message.
The CAN data link layer comprises two protocols: Classical CAN introduced in 1986 and CAN FD introduced in 2012. The protocols are internationally standardized in ISO 11898-1:2015. Both protocols support base frames (11-bit CAN-ID) and extended frames (29-bit CAN-ID), leading to four message frame formats:
The Classical CAN protocol uses one bit-rate in the arbitration and the data phase. The transmission speed is limited to 1 Mbit/s. The payload (i.e. the data field) is limited to 8 byte. The following picture shows a Classic CAN frame with an 11-bit CAN-ID.
The CAN FD protocol allows payloads up to 64 byte. Additionally, it supports an optional second bit-rate for the data-phase (field BRS). The following picture shows a CAN FD frame with an 11-bit CAN-ID.
The J1939 protocol stack uses a well-defined API to the CAN (FD) interface. Thus can be adopted to any kind of CAN (FD) controller. The CANpie (FD) API is an open standardized software, developed by MicroControl, for reading and writing CAN (FD) messages. For further information visit CANpie (FD) Documentation on GitHub.
canpie.h | CANpie constants, structures and enumerations |
cp_core.h | CANpie core functions |
cp_fifo.h | CANpie FIFO functions |
cp_msg.h | CANpie message access |
If no MicroControl CANpie (FD) device driver is used, the upper header files must be included. Explanatory examples can be found in the following directory source/application/template-device
.