The CAN protocol provides very high throughput and low latency, enabling components to share high-bandwidth data quickly and with very little collision. The protocol also has good fault detection and tolerance features that help to ensure reliable communication between components.
The CAN Controller Architecture consists of two main components: the controller and the node. The CAN controller is responsible for providing the CAN environment and for communicating with devices connected to the CAN bus. The CAN node is a hardware module that is responsible for connecting components on the CAN bus to the controller and transmitting data.
The CAN controller architecture is based on a master-slave model. The master device is the controller which is responsible for managing and controlling the information transmitted over the bus. The slave devices are the nodes which are responsible for sending and receiving data to and from the controller.
The CAN protocol includes a range of features, such as bus arbitration and error detection, to help ensure reliable communication. Bus arbitration is used to determine which device has priority to access the bus, while error detection is used to detect and reduce errors on the bus.
The CAN Controller Architecture also defines the types of messages it can transmit, such as data frames and command frames. Data frames (or messages) contain information about the function of the message, such as the type of data being transmitted, the source and destination of the data, and the data itself. Command frames inform devices about the status of the CAN bus, such as the type of data being transmitted, and can also be used to send general commands.
CAN controllers are typically implemented in hardware as either bit-timed or time-triggered controllers. Bit-timed controllers are able to synchronize with the data rate of the CAN bus, allowing for higher transmission speeds. Time-triggered controllers, on the other hand, are used in applications that require precise timing between nodes.
Bus Arbitraton
The CAN Controller Architecture includes a feature known as bus arbitration. It is the process of determining which device has priority to access the bus. The device with the highest priority will be granted access while the device with the lowest priority will be denied access. Bus arbitration is used to prevent multiple devices from competing for access to the CAN bus, as well as to coordinate different types of frames that need to be processed.
For bus arbitration to work, each device connected to the CAN bus must be assigned a priority level. The devices are then assigned arbitration IDs (AIDs) which are used to indicate the priority of the device. Devices are granted access to the bus based on their AID – the device with the highest AID has the highest priority.
The CAN Controller Architecture also defines a sequence of events that occurs when a device wants to access the bus. When a device sends a request to access the bus the controller will compare the AID of the device to the AIDs of all other currently active devices on the bus.
If the device has the highest AID it will be granted access to the bus, and all other devices on the bus will be denied access until the device completes its request. This process is known as collision resolution and is used to ensure that only one device has access to the bus at any given time.
Error Detection
In addition to bus arbitration, the CAN Controller Architecture also includes features for error detection and data integrity. Error detection is used to detect and reduce errors on the CAN bus. Error detection is implemented in a variety of ways, such as checksums and cyclic redundancy checks (CRCs).
Checksums are a simple form of error detection. They compare the data being transmitted against a known value in order to determine whether any errors have occurred in the transmission. If the data matches the known value then no errors have occurred, if it does not then errors have occurred and the data should be resent.
CRCs are more complex forms of error detection. They use a mathematical process to compare the data being transmitted against a known value. If the data matches the known value then no errors have occurred, and if it does not then errors have occurred and the data should be resent.
Error detection is important for ensuring reliable communication between devices on the CAN bus. It also helps to resolve conflicts and ensure that data is transferred in a efficient and reliable way.
Commands Frames
Another important feature of the CAN Controller Architecture is the ability to send command frames. Command frames are used to inform devices about the current status of the CAN bus, such as the type of data being transmitted, as well as to send general commands.
For example, a device on the CAN bus may need to know when another device is connected or disconnected. The device will send a command frame to the other device requesting this information. The other device will then respond with a data frame containing the requested information.
Command frames are also used to enable devices to communicate with each other. For example, two devices may both need to send data to a third device on the CAN bus. The two devices can use a command frame to inform the third device that they are both ready to send their data, and the third device can then respond with a data frame containing the requested information.
Bit-timed Controllers
The CAN Controller Architecture is typically implemented in hardware as either bit-timed or time-triggered controllers. Bit-timed controllers are designed to synchronize with the data rate of the CAN bus, allowing for higher transmission speeds.
Bit-timed controllers use a technique called bit slicing which divides the data into a sequence of bits and then uses different sets of voltage levels to represent logical values for each bit. This allows for faster transmission speeds, which can be advantageous for applications that require large amounts of data to be transferred quickly.
Bit-timed controllers are used in applications where the transmission speed is critical, such as automotive and industrial applications. They are also used in applications where high throughput is important, such as in audio and video streaming.
Time-triggered Controllers
Time-triggered controllers are used in applications that require precise timing between nodes. The primary benefit of time-triggered controllers is that they can guarantee synchronous communication between devices on the CAN bus.
Time-triggered controllers use a technique called time slicing which divides the data into a sequence of slices and then uses different sets of voltage levels to represent logical values for each slice. This allows for more accurate timing between nodes, as each device is able to synchronize its clock with the other devices on the bus.
Time-triggered controllers are typically used in applications that require high reliability such as aerospace and avionics applications. They are also used in medical applications, where accurate timing between devices is critical.
Fault Tolerance
The CAN Controller Architecture also includes features for fault tolerance. Fault tolerance is designed to protect the system from errors that may occur on the CAN bus.
Fault tolerance features include bus monitoring, error detection, and bus recovery. Bus monitoring is used to detect possible faults on the bus and to generate an alarm when a fault is detected. Error detection is used to detect and reduce errors on the bus. And bus recovery is used to restore the bus to a working state after a fault has occurred.
Fault tolerance is an important part of CAN communication, as it helps to ensure reliable communication between devices on the CAN bus and helps to reduce the risk of system outages.
Data Frames
The CAN Controller Architecture also defines the types of messages that can be sent, such as data frames and command frames. Data frames contain information about the function of the message, such as the type of data being transmitted, the source and destination of the data, and the data itself.
Data frames are typically used to transfer data between two or more nodes on the CAN bus. Data frames can be used to send commands, status updates, sensor readings, and other types of data.
Data frames are typically organized according to a certain format. For example, a standard data frame might consist of a start bit, a control field, a data length code, a data field, an error checking field, and an end bit.
Conclusion
The CAN Controller Architecture is a powerful and reliable system for enabling communication between different devices on a CAN bus. It includes features for bus arbitration, error detection, and fault tolerance to ensure reliable communication between devices. It also defines the types of messages (data frames and command frames) that can be sent. In addition, CAN controllers can be implemented as either bit-timed or time-triggered controllers, depending on the application.