
AT32 MCU CAN Quick Start Guide
2022.7.19 6 Ver 2.0.1
1 Introduction to CAN
The Controller Area Network (CAN) is designed to efficiently process a large amount of messages
with minimum CPU usage. It is a serial bus protocol created in 1986 by the German company
BOSCH and ISO standardized with ISO11898 and ISO11519, which gain popularity in the
automotive network domain in Europe. It has been recognized for high performance and reliability
and widely used in industrial automation, ships, medical facilities and industrial equipment, etc.
Features of CAN protocol:
Multi-master control
When the bus is idle, all nodes can start sending messages. When multiple nodes start
sending at the same time, the bus proceeds arbitration according to the identifier (ID), and
the one with the lowest ID (highest priority) wins and gets the right to send while all other
nodes (with lower priority) switch to a receiving mode. It should be noted that ID does not
the node address but the priority of message to be sent.
Flexibility
As mentioned, there is no address information of nodes on the CAN bus; therefore, adding
or removing a node does not affect the hardware and software of other nodes on the CAN
bus.
High reliability
CAN protocol features are error detection, error notification, fault confinement and error
handling. Every node on the CAN bus can detect an error (error detection) in a message.
If any error is found, the discovering node will transmit an error frame to notify other nodes
(error notification). Each node has an error counter internally that accumulates error count
value every time an error is detected. When the accumulative error count value of one
node is greater than 256, this fault node is disconnected from the CAN bus to avoid
affecting other nodes (fault confinement). If the node detects an error when sending a
message, the erroneous message will be retransmitted after the fault is cleared (error
handling).
Fast and long-range communication
The rate can reach 1 Mbps (communication distance < 40m) and communication distance
can reach 10km (rate < 5Kbps).
Multiple nodes
The number of nodes on a CAN bus is not limited theoretically, but the ultimate number is
determined by the bus time delay and electrical load. Lowering or increasing the
transmission rate can correspondingly increase or decrease the number of nodes.
With these features, the CAN is suitable for interconnection of industrial process monitoring devices
and is recognized as one of the most ideal fieldbuses for industrial applications. The CAN protocol
is ISO standardized with ISO11898 and ISO11519, in which ISO11898 is the CAN high-speed
communication standard with a communication speed of 125 Kbps~1 Mbps and ISO11519-2 is a
low-speed communication standard with a communication rate of 125 Kbps or less. In this
application note, the ISO11898 standard is adopted and the communication rate is 1 Mbps.