[ES-EN-47] CAN Bus Arbitration ||CAN Protocol Basics part-3||
Introduction to CAN Bus Arbitration
Overview of the Session
- The speaker invites viewers to subscribe for updates on embedded systems and introduces the topic of CAN bus arbitration.
- The session will cover how multiple CAN nodes can access the bus simultaneously, emphasizing the importance of priority assignment during data transmission.
Understanding CAN Frame Formats
- Discussion includes standard (11-bit) and extended (29-bit) CAN frame formats, focusing on their arbitration fields.
- The 12-bit arbitration field in standard frames and 30-bit in extended frames are crucial for determining message priority.
CAN Bus Logic and Node Interaction
Initial State of Nodes
- All nodes start in an ideal state; when a node wants to send data, it transmits a startup frame sequence with a dominant bit (logic 0).
- An example is provided with three connected nodes (A, B, C), illustrating how they interact within a wired logic format.
Dominant vs. Recessive Bits
- If all nodes send logic 0 simultaneously, the bus logic remains dominant; if any node sends a recessive bit (logic 1), the bus logic changes accordingly.
- A truth table is referenced to explain how dominant bits dictate bus logic states.
Arbitration Process Among Nodes
Priority Assignment
- In scenarios where multiple nodes attempt to transmit data while one node (D) remains in receiving mode, priority must be established through arbitration.
- Four message identifiers are introduced as examples for understanding which node gains transmission priority based on identifier values.
Binary Representation of Identifiers
- Message identifiers are represented in binary format from right to left; this representation is essential for determining priorities during transmission.
Determining Winning Node Based on Identifier
Winning Criteria Explained
- The node with the lowest message identifier wins priority; this process involves analyzing each bit transmitted by competing nodes.
Conclusion of Arbitration Example
Understanding CAN Protocol and Bus Arbitration
Overview of Bus Logic
- The speaker discusses sending the ninth bit as all ones, resulting in a bus logic that remains dominant. This indicates how wired AND logic operates within the bus system.
- The concept of dominance is introduced, where if all bits are one, the bus also becomes a dominant bit. The priority for arbitration is determined based on which node sends a dominant bit.
Node Priority and Arbitration
- Node B sends a recessive bit (logic one), but since the bus logic is zero (dominant), it loses arbitration. This highlights the importance of monitoring bus logic after sending bits.
- Continuous monitoring of bus logic is emphasized; if a node sends a recessive bit while the bus logic is zero, it loses priority in arbitration.
Winning Priority in Arbitration
- If any node sends a recessive bit while the bus logic remains dominant, that node will lose its priority. In this case, Node B lost its chance to transmit data.
- Nodes A and C are checked next; if they send dominant bits while maintaining their status, they can continue transmitting data.
Data Transmission Process
- Node C wins priority due to having the lowest identifier value among competing nodes. It continues to send data until an intermission field occurs.
- The process of determining which node has priority based on identifier values is reiterated; lower values win arbitration when multiple nodes attempt transmission.
Flowchart for CAN Protocol Understanding
- A flowchart illustrating steps for waiting until the end of an intermission field before sending data is introduced as part of understanding CAN protocol operations.
- When multiple nodes attempt to send startup frames simultaneously, checking both arbitration bits and bus logic ensures correct transmission processes.
Monitoring During Transmission
- If both sent bits match during transmission (e.g., all ones), then further checks confirm whether all bits have been transmitted correctly before proceeding.
- As each subsequent bit is sent (like zeros or ones), continuous evaluation against current bus states determines whether nodes maintain their priorities or lose them.
Conclusion on Bus Logic Dynamics
- The discussion concludes with examples showing how different nodes interact during transmission attempts and how losing dominance affects overall communication efficiency within the network.
Understanding CAN Bus Arbitration and Bit Error Monitoring
Key Concepts in CAN Protocol
- The discussion highlights the importance of monitoring received bits when sending dominant bits in the CAN protocol. This is crucial for identifying bit errors during communication.
- A specific example illustrates that if a zero is sent but monitored as one, it should be classified as a bit error. This emphasizes the need for accurate bit status monitoring to ensure reliable data transmission.
- The concept of arbitration in CAN networking is introduced, where nodes with lower IDs are given priority. This mechanism determines which node can send messages on the bus first.
- The speaker stresses that understanding how to monitor bit statuses is essential for effective communication over the CAN bus, particularly regarding error detection and resolution.