Electronic – TXERR error in CAN communication

canerror

I tried CAN communication using PIC18F25K80 and MCP2551. Using two
nodes, I could transmit data from one node to other. But, data was transmitted only when the receiver buffer was set to ignore all errors and both the nodes were configured in 'Normal mode'. And, then I configured the receiving node in the 'Listen only mode' and data was received even when the receive buffer was set to 'Receive all valid messages as per the EXIDEN bit in the RXFnSIDL register'.

But, as the TXERR and IRXIF bits were set in the transmitting node, TXREQ bits was not cleared and the message was continuously sent. What could be the reason that causes these errors?

(I have used the internal RC oscillator set at 64 MHz and the baud rate was set as 100 kbit/s.)

enter image description here

Best Answer

CAN bus should have at least TWO active nodes. CAN Transmitter considers a transmission successful only if it gets ACK.

When you configure a node in "Listen Only Mode", it recieves data but doesn't Acknowledge it. As there is no other node on bus, Transmitter doesn't get any ACK and hence Error.

Try connecting one more active node on bus and do same experiement. As far as my Experience, You will not get any errors.