The design is as follows:
I have both ends terminated with the 120 Ω resistor and jumper soldered. My multimeter reads 60 Ω between CANH and CANL on both sides. Both boards share the same power supply (common 5 V rail, common GND).
Software side, I am using an Optiboot bootloader and the Arduino environment for faster prototyping. (I set both my controllers on NormalMode with default filters a.k.a receive all for testing). I've tried a lot of libraries for the MCP2515, and software don't seem to be the problem.
Two of the best libraries I've found:
My problem is that I can't get the communication to work.
The boards won't receive messages from each other, while they can receive messages from a third-party board, but still can't send to said board.
As you can see I have RX_CAN and TX_CAN probe points between the transceiver and controller. Scoping TX_CAN on the transmitting board and RX_CAN on the receiving I get this weird behavior when I zoom in a single low portion of the message (yellow is the RX_CAN).
I've already tried replacing the controller and transceiver chip. Could this be a bad decoupling capacitor?
After removing the LEDs, which was the problem for the weird noise, I still can't get the signal on the receiving side to follow the rest, Shouldn't the CANH/CANL signals be opposite?
mcp2551 pcb layout