//php echo do_shortcode(‘[responsivevoice_button voice=”US English Male” buttontext=”Listen to Post”]’) ?>
Due to higher bandwidth requirements in the automotive field, the Controller Area Networking (CAN) specification has been extended for flexible data rates with a new iteration known as CAN FD.
CAN offers advantages such as cost, flexibility and robustness, all of which are very beneficial for non-automotive applications in many fields. The market opportunities are even wider with the CAN FD extension. This article covers the fundamentals of CAN and CAN FD and the different application implementations using different physical layers or higher layer protocols with CAN as the data link layer.
First, let’s discuss the advantages of CAN over standard serial communication such as RS232 or RS485. Due to the higher communication speed of CAN with error detection, it offers excellent robustness and reduced cost.
Cost and flexibility
The biggest driver for the automotive industry was to reduce the amount of wiring in the car. Due to the twisted pair wiring, it is relatively easy to lay the wire, and it is less heavy and expensive. Termination resistors are required to operate CAN and CAN FD at higher speeds. Flexibility is a big plus, as it is very easy to expand the system with more nodes.
Error detection and robustness
CAN and CAN FD incorporate very reliable error checking mechanisms. Bit stuffing and monitoring operate on layer one, while frame verification, acknowledgement, and cyclic redundancy check operate on layer two of the OSI model.
Bit stuffing adds an alternate bit after five consecutive high or low bits. Six consecutive bits of the same level indicate an error. Bit monitoring replays each message sent. If there is a difference (except in the arbitration or acknowledgment field), an error is detected. A big advantage is that errors are detected very quickly.
Cyclic redundancy checks are implemented differently on CAN compared to CAN FD due to different data lengths. Framing errors (sometimes also called format or shape errors) use predefined values that must be the same on the receiver side. Each message must be acknowledged. This three-fault checking mechanism works well at the message level.
In summary, CAN and CAN FD are very robust and reliable with several different error checks. No data is lost during message transmission and message collisions are avoided. Each node waits for a period of inactivity before transmitting. In case two messages are sent at the same time, the sender detects which message has a higher priority and deactivates the message with a lower priority. Compared to Ethernet where both messages are stopped and sent later, on CAN the message with the higher priority passes.
High speed and low latency
CAN supports data rates up to 1 Mbps. With CAN FD, the data rate can be increased for the command and data area depending on the maximum clock of the CAN FD controller. The bit rate of the arbitration phase remains at 1Mbps maximum.
The latency for CAN is less than 145us while for CAN FD with 8Msps and 8Byte data it is less than 58us.
Short data frames have a latency advantage. The complete package is transferred and decoded faster and therefore the reaction time is also faster. With higher baud rates on CAN FD, this effect is even greater. Compared to TCP/IP communication, which is designed for a large amount of data, the packages are relatively large and hence the latency increases. This means that CAN FD, depending on the amount of data, potentially has faster reaction times compared to TCP/IP communication with 10 or 100 Mbit, and shows better total real-time performance.
Regarding the number of nodes, there is theoretically no limit because each message can be sent to a different node. In practice, each node causes signal reflections on the bus and the transmission quality depends on the CAN transceiver and the implementation on the physical layer.
This is also the reason for the limitation in terms of speed when it comes to long distance. Typical values are a maximum of 25 nodes on CAN and a maximum of 8 nodes on CAN FD.
Application examples outside the automotive industry
Why use CAN FD outside automotive applications? Due to the great advantages described above. CAN and CAN FD are widely used in all industries including:
- building automation
- Elevator and Elevator
- Access control, light control and secure door opener
- Air conditioner
- Automotive Aftermarket
- Fleet tracking, vehicle tracking
- Logging for predictive maintenance, telematics, insurance and black box
- Medical and sanitary equipment
- Industrial drives
- Between host and chained actuators
A great use case for MCUs with two CAN FD control units in combination with TrustZone and Security is a control unit in building automation separating secure parts from unsecured parts. A CAN FD controller can be used on the secure side to control critical components such as door openers, sliding doors and ID card readers. The second CAN FD can be used for non-critical control parts in building automation, such as light switch buttons, light bulbs and doors inside the building.
Another use case for dual CAN FD units is gateway functionality, such as in large building automation systems, large cabinets, and communication expansion modules. There are many different use cases for microcontrollers with integrated CAN FD controllers such as actuators, sensors, and control.
The CAN FD is ideal for applications requiring high safety and reliability, such as robots, elevators and transportation systems, as well as medical and healthcare systems. The reliability requirements needed in automotive applications are also very beneficial in these use cases.