Can bus arbitration mechanism

The CAN bus is a priority-based serial communication network. It adopts the carrier-sense multiplexing collision avoidance protocol. The starting part of the data frame transmitted in the CAN bus is the identifier of the data, and the identifier can distinguish the messages from the messages. The priority (0 has the highest priority).

The CAN bus is a multi-master work mode. Any node on the network can actively send messages to other nodes on the network at any time. If two or more nodes start transmitting messages at the same time, a bus access violation will occur. According to the bit-by-bit arbitration principle, the node with the lower priority actively stops sending data with the help of the identifier at the beginning of the frame, and the priority is high. The node continues to send information. During arbitration, the CAN bus performs an AND operation. Each node compares the level sent by the node with the bus level. If the levels are the same, the node can continue to send. If the specified 0 has a high priority, when a node sends 1 and detects 0, the node knows that there is higher priority information being sent, and it stops sending messages until it detects the network idle again.

In CAN, the bus uses a communication mode called carrier monitoring, multi-master control/collision avoidance (CSMA/CA). This bus arbitration method allows each bus on the bus to have control over the bus and send data out. If two or more devices are required to transmit data at the same time, a bus collision occurs. The CAN bus can detect these conflicts in real time and arbitrate them, so that data with high priority is not damaged. Transmission.

When the bus is idle, it is recessive, and any node can send a dominant level to the bus as the start of the frame. If two or more are sent at the same time, competition will occur. The method of solving the CAN bus competition is basically similar to the Ethernet CSMA/CD (Carrier Sense MulTIple Access with Collislon DetecTIon) method, as shown in Figure 1. In addition, CAN, the bus has been improved and used CSMA/CA (Carrier Sense MulTIple Access withCollision Avoidance) to access the bus to arbitrate identifiers in bits. While sending the level to the bus, each node also reads the level on the bus and compares it with the level sent by itself. If the same level continues to send the next bit, it stops sending and exits the bus competition. The remaining nodes continue the above process until there is only one node left to send the level on the bus, the bus contention is over, and the node with the higher priority gains control of the bus.

Can bus arbitration mechanism

The CAN bus transmits data in units of packets. The priority of the messages is combined in a 44-bit identifier (identifier 29 bits of the extended frame). The node with the identifier with the lowest binary number has the highest priority. Once such a priority is determined at system design time, it cannot be arbitrarily changed. The conflict caused by bus reads is mainly depended on these bits to arbitrate. The reason why the CAN bus does not use Ethernet delays to avoid collisions is mainly to ensure that nodes with higher priorities can be transmitted in real time, and CSMA/CA can effectively avoid collisions.

As shown in FIG. 2 , the 10th, 9th, and 8th bits of the identifiers of node A and node B have the same level, and therefore the information heard by the two nodes is the same as the information they send out. The 7th node B sends a "1", but the message received from the node is "O", indicating that a node with a higher priority uses the bus to send a message. Node B will exit sending in a listen-only mode without sending data; Node A successfully sends an arbitration bit to gain control of the bus and then sends all messages. The signal in the bus is continuously tracked and finally the message sent by the control of the bus is obtained. In this example, the message of node A will be tracked. The advantage of this non-destructive bit arbitration method is that before the network finally determines which node is to be transmitted, the initial part of the message has already been transmitted in the network, so there is no delay in the data transmission of the node with high priority. In the process of sending data to a node that gains control of the bus, other nodes become receiving nodes of the message and do not send the message until the bus is free again.

Can bus arbitration mechanism

CAN non-destructive bitwise arbitration diagram

Can bus arbitration mechanism

Figure 3 shows the level logic of nodes on the CAN bus. The level of the nodes on the bus is relative to the bus level. Only when the voltages of the three nodes are equal to 1 (recessive level) will the bus be able to Stay in the vcc (recessive level) state.

As soon as there is 1 node switching to the 0 state (dominant level), the bus is forced to the dominant state (0). This arbitration method of avoiding bus conflicts enables messages with high priority to occupy bus transmissions without delay.

Can bus arbitration mechanism

Bitwise arbitration is a special arbitration mode of CAN bus. The dominant bit covers the recessive bit. According to this mechanism, packets with a high priority occupy the bus, and packets with a lower priority quit the competition. Because CAN has such an arbitration mechanism, it is difficult to resist high-priority attacks and retransmit packet attacks.

For example:

1>Because the module of CAN transmits the data at the same time, also will monitor the bus at the same time, suppose two nodes send data at the same time, the first 3 bits sent by A node are 100, B node is 101, send in the first 2 bits Upon completion, both nodes will consider themselves successful, but when sent to the third bit, node B will lose arbitration because 0's priority is higher than 1's priority, and node B's monitoring is not 1 on the bus. , so lose arbitration and wait for the data to be resent. After the CAN node loses arbitration, it automatically retransmits it according to the CAN 2.0B protocol specification. If high priority packets keep occupying the bus, other low priority packets will not be arbitrated but will try to resend them. Only when high-priority packets no longer occupy the bus, low-priority packets may be sent successfully. Otherwise, low-priority packets will appear to be "fake starving." (For example, in CAN_NM logical ring network management, timers such as T_max, T_type are used to prevent packets from starving to death.)

2> If multiple units on the CAN bus at the same time send data to the bus at the same time and continue sending with high priority, how can you ensure that the data with low priority is not lost? If the entire can network is managed by itself, you can adjust the sending time of each node through the application layer protocol. Regardless of the priority level, if the sending time is too long (this length depends on your project), the sending is suspended. Let other nodes send. Or each node triggers the sending at a certain time so that each node has a chance. The general idea is to do time management. If the project is not as serious as your high-priority bandwidth, you will use (non-real-time information idle) polling + (real-time information) to actively manage the network.

SIM Card Connector

Antenk Card SIM Connectors are precision engineered PCB mount connectors developed to mate with the plated fingers of a printed circuit daughter board. Their bifurcated, cantilever contacts are set in a dual readout configuration and they offer a reliable connection for a wide range of PCB thicknesses. Antenk`s sturdy solder tails with tapers allow easy insertion and rugged durability


SIM Card Connectors Introduction

SIM card connectors designed for applications requiring two or more pcb`s to be connected and readily removed.

As the market trends towards versatility, customers need flexible high-speed edge card receptacles that can be utilized across as many platforms as possible. Through creating industry standards by collaborating with customers, Antenk is committed to offering a wide range of edge card receptacles that can be used in multiple applications across one solution.
Flexible Solutions Solving Many Problems
Antenk Edge Card Connector Solutions solve many problems across a wide range of circuit sizes, configurations, pitch, and PCB-attach terminations. Scroll down list to see more on our full line of edge card solutions.

Types of Card Edge Connectors
AMC / AMC B+ Connectors
Micro TCA Connectors
PCI Express / PCI Connectors
Standard Card Edge Connectors
Edgecard PCB Connectors Range

SIM Card Connector,Pci Card Edge Connector,Pitch Card Edge Connector,Pcb Edge Card Connector,AMC / AMC B+ Connectors,Micro TCA Connectors,PCI Express / PCI Connectors,Standard Card Edge Connectors

ShenZhen Antenk Electronics Co,Ltd , https://www.antenkcon.com