This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CAN: More than one slave problems

HI,
I am working with LPC2129 with full CAN bus.
I have written a code for master and slave. i am running a heartbeat LED on both of them at a rate 1Hz, and they work fine.
When i connect 2nd slave after having done the appropriate changes, the LEDs on two slaves run on much slower frequency 1/2 Hz. ? why? are there certain registers need to be configured for this issue.?
the code i am using should run the same either with one slave or more.
I am using 1Mbps baud rate...

Parents
  • Hi RA,

    CAN is a multi-master bus, there is no slave or master. If you use the term slave or master, then it is related to your implementation of the different service layers. CANOpen for example defines services like NMT, DBT PDO, SDO and each service can be implemented as master or slave. But the CAN communication is always multi-master.
    For your example, you should define a Process Data Object (PDO) that is send by the producer of the heartbeat. All consumers of the heartbeat message should setup a message filter that accepts exactly this message. Implementing your solution this way should work without any problems. One message is send for every occurring heartbeat, independent of the number of consumers of this message.

    Frank

Reply
  • Hi RA,

    CAN is a multi-master bus, there is no slave or master. If you use the term slave or master, then it is related to your implementation of the different service layers. CANOpen for example defines services like NMT, DBT PDO, SDO and each service can be implemented as master or slave. But the CAN communication is always multi-master.
    For your example, you should define a Process Data Object (PDO) that is send by the producer of the heartbeat. All consumers of the heartbeat message should setup a message filter that accepts exactly this message. Implementing your solution this way should work without any problems. One message is send for every occurring heartbeat, independent of the number of consumers of this message.

    Frank

Children
No data