Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] arbitration issues in can communication

Status
Not open for further replies.

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
i am doing can communication using at89s8252 mcu, mcp2515 can controller, pca82c250 can tranciever..i have doubt that if on a can bus if two data frames with same identifier and same data field will arise at the same time ...then will be their any arbitration occured and if yes then who will win and who will loose the arbitration...please guide me thank you
 

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
I think as per bus arbitration is simple AND operation. So it will send both frame and both frame will the arbitration. and if it losses bus arbitration then it will send the frame again.
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
so who will loose arbitration and how....because as i said that both the frame having same bits upto the data field means the identifier and datas are same how the arbitration occures please explain it sir..........
 

ftsolutions

Full Member level 5
Joined
Nov 19, 2009
Messages
242
Helped
71
Reputation
142
Reaction score
68
Trophy points
1,308
Location
United States
Activity points
3,709
CAN controllers monitor the bus lines while they are transmitting (listen while talking). As soon as they detect a dominant bit (usually low) when they are trying to send a recessive bit (usually high) as sampled at the configured bit times, it will assume that someone else has the bus and it will stop transmitting, and will back off for a preconfigured random time interval before re-trying any transmission. So, normally if you do want to give a slight priority over a particular device on the bus, you give it an address with the most dominant (low) bits to use on the bus - it will tend to win any bus arbitration issues the soonest.
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
dear ftsolution , sir actually i asked that if two node are with same identifier that is the address of device as u said and the data field are same that means two identical data frames ...it means they have equal number of dominant and recessive bits then how the arbitration will occurre and who will win the arbitration and how....
 

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
as i said earlier that bus is AND logic that is if one node send dominant and other one is sending recessive then dominant bit will the arbitration and will on bus.
In your case both frames are same that is ID and Data also then all the bits will the same.
If both frame starts tx at the same time then both will on bus till complete tx.
and If same frame sending at different time it follow the arbitration rule and node will the win as per arbitration.
 

debabrta kar

Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Activity points
1,858
how it is possible that two data frames will be on bus till complete tx.....that means if two nodes are trying to access one same node by sending their data frames (both the data frames are identical as i said above) ..then the 3rd node will receive both the frames ...how is it possible ...please explain because as we know on a can bus at a time only one frame can be avalible and only on bus can access the bus at a time ...otherwise it will violate the arbitration rule...please explain your point sir.....
 

ftsolutions

Full Member level 5
Joined
Nov 19, 2009
Messages
242
Helped
71
Reputation
142
Reaction score
68
Trophy points
1,308
Location
United States
Activity points
3,709
You are postulating a quite unlikely situation except by intentional mis-use/experimentation of the CAN bus. In general, (2) nodes won't be EXACTLY synchronized and even if they differ in timing by some reasonable fraction of a bit width, one or the other (the first to start with a dominant bit) will win, based on the sample points within the bit widths. If you did intentionally, exactly, synchronize (2) nodes with the exact same message and sent them at exactly the same time, there would in essence, only be (1) message on the bus (the exact same one) even through it came from (2) sources. There are times when we do want to send a broadcast message out for all (or many) nodes on a CAN bus to receive at the same time, but on the same bus, we generally want the messages to be identifiable as to their source - this is commonly used with the producer-consumer model.
In this model, it is common for a producer (message sender) to issue a message that will be simultaneously received and used by multiple consumers. If you have multiple producers which are producing the exact same message at the exact same time, there is no advantage/use to it. The consumer nodes cannot tell the difference. The principle advantage of CAN is that a single message can be received/used by multiple nodes at the same time, contributing to the efficiency of the system.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top