I have LM4F120H5QR (Stellaris) board. It has a CAN controller but does not have a transceiver. Is it possible to connect 2 such kits (without transceiver) for peer to peer communication using CAN?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have LM4F120H5QR (Stellaris) board. It has a CAN controller but does not have a transceiver. Is it possible to connect 2 such kits (without transceiver) for peer to peer communication using CAN?
Hi Harshita,
Unfortunately, I do not think that this will work for you. The way the CAN protocol works is that the CAN controller (your Stellaris device) monitors the bus while it is sending a message to ensure that what it is transmitting has correctly been sent onto the bus. This is especially important during arbitration, where two nodes could be simultaneously trying to access the bus at the same time. In the physical layer (transceiver, bus, etc.) the signals are logically ANDed together where recessive is a logic “1” and dominant is a logic “0”. If any node sends a dominant the bus is dominant, only if every transceiver is transmitting a recessive signal will the bus remain recessive.
If you were to connect two of these Stellaris devices together, I would assume that you would connect the CAN0Tx pin of one device to the CAN0Rx pin of the other, and then the CAN0Rx pin of the first to the CAN0Tx of the second. If you were to do this and the first board was sending a message (sending bits on the CAN0Tx pin), it would not receive the message that it was transmitting back on Rx pin. It would view this as an error and transmit an error frame and discontinue sending the message.
If you then tried to connect all the RX and TX signals together, so that each controller would see its own message, then the issue I would see is if both Stellaris devices tried sending signals of opposite logic levels. One device would be pulling high, and the other would be pulling low. You wouldn’t be able to guarantee the logic level the Stellaris devices would see at the Rx pins.
Please let me know if you have any other questions.
Thanks,
John
This is correct, you need a transceiver to add these necessary features of how CAN works. To keep it simple you may want to look at the SN65HVD232 CAN transceiver which is single supply 3.3V and should interface with the Stellaris nicely and it doesn't have extra mode or other features, just a straight forward CAN transceiver. IF you are on a PCB you still have to make sure and put the CAN termination resistors on the CAN "bus" to make sure it works properly from a timing and load perspective even though you don't need them for reflections.
-- Scott