0

I started down this path, because I've got a CAN driver in uCLinux that I'm reviewing. I'm new to CAN in general, so I was doing a little research about it, and I've stumbled upon a question that I haven't found an answer to.

If CAN is a serial interface, and CANopen doesn't have a "bus master", then how does the CAN protocol handle inevitable collisions of data on the bus? If there's no one governing when you can send, given enough devices and time there will have to be sends that collide.

It's a pretty basic question, so it's possible I found an answer and just didn't understand it... If anyone can provide an answer/example that would be great.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mike
  • 47,263
  • 29
  • 113
  • 177
  • The last two paragraphs of [CAN bus, sub section *Data transmission*](https://en.wikipedia.org/wiki/CAN_bus#Data_transmission) (starting with "During arbitration, each transmitting node monitors the bus state") explains it, but it could be clearer. – Peter Mortensen Mar 04 '14 at 19:03

1 Answers1

2

It's done through CSMA/CD.The signal of CAN is wire AND logic. So the smaller message id can have higher priority based competing with wire AND logic.

Johnny WU
  • 64
  • 2
  • No, the CSMA/CD part is not true. In fact, the CAN bus avoids collisions on the electrical level and thus there isn't any need for collision detection (CD). – Peter Mortensen Mar 04 '14 at 18:55
  • It is CSMA/BA (carrier sense multiple access/bitwise arbitration), not CSMA/CD. See e.g. [CAN bus, sub section *Data transmission*](https://en.wikipedia.org/wiki/CAN_bus#Data_transmission). – Peter Mortensen Mar 04 '14 at 19:00