priority of CAN messages

Hi there - I was just reading about priority of CAN messages - and want to confirm a couple things:

First of all, my understanding is that, between frames of the same type (standard vs extended) - the lower the identifier, the higher the priority. So if two nodes both sent messages at the exact same time, one with an identifier of 1 and the other with an identifier of 10, the frame with an identifier of 1 would win arbitration.

Now - what about between frames of different types? My understanding is that, if the first 11 bits are the same between two CAN messages sent at the same time, the standard frame will win arbitration over the extended frame.

Is this all correct?

Lastly - what happens when two nodes send a frame with the same ID and the same type? I understand this is illegal - but still. Would the arbitration just happen as soon as soon as the two frames differed in a bit?

Thanks!

-Michael

Reply to
Michael
Loading thread data ...

Yes. Zeroes are "dominant", so they win against ones.

Yes. That's the way the IDE bit is defined. Dominant, i.e. zero, means it's a standard CAN frame.

No. Arbitration only happens during transmission of the frame header. The data must be consistent. If the data sent by both nodes are the same, everything's fine and no flags will be raised. But if they differ, that's a bit error, and both nodes stop sending. If this happens too often, such nodes will eventually go bus-off.

Reply to
Hans-Bernhard Bröker

Hans took the words out of my mouth (or off of my fingertips, as the case may be).

It is necessary to prevent this from happening when you define your data dictionary or choose your protocol. _Any_ implementation of _any_ network that allows duplicate messages to go flying around is a problem waiting to happen.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" gives you just what it says.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.