2
\$\begingroup\$

I have two CAN transceivers on the same PCB; they are connected to a Raspberry and a PIC32 MCU.

The PIC32 can receive and send any message, but the RPI can rarely receive messages from the microcontroller. Messages from external USB CAN devices can be received perfectly by both devices. Termination is OK between L and H.

Is it a problem that the 2 transceivers are too close together? Should I look for the problem in the software settings?

schematic

simulate this circuit – Schematic created using CircuitLab

Update: Thank you for your answers. Sorry if my question did not contain enough information.

I have been using and planning CAN bus communication for years. When I designed the circuit I thought it shouldn't be a problem if I put two transceivers that close together. I tried so many things in the troubleshooting process that I started to doubt everything. I actually wondered if the particular arrangement could cause a problem.

Baud rate, wiring, other basic things to look at are fine. Now I suspect the timing, but I would be very surprised if there was a problem with that, since all the devices run an external oscillator to get the clock as accurate as possible.

I also thought about intermittent bad soldering, but then there would be more problems with the external usbcan device also. I will doublecheck that.

I think there is a software problem, but I have tried the same configuration several times and so far no problem.

mcu tranceiver

RPI CANBUS

\$\endgroup\$
5
  • 2
    \$\begingroup\$ "It's not working, why? - No details provided" questions are impossible to answer. This could be caused by basically anything from incorrect wiring and bad soldering to incorrect baudrate settings or bad clock source picked. You could start by sharing an actual schematic. \$\endgroup\$
    – Lundin
    Commented Feb 7 at 13:45
  • 2
    \$\begingroup\$ "Is it a problem that the 2 transceivers are too close together?" No. If anything, two CAN transceivers close to each other helps improve potential issues. You need to provide the schematics of the CAN components; this simplified diagram isn't sufficient. \$\endgroup\$
    – Velvet
    Commented Feb 7 at 14:54
  • \$\begingroup\$ Sorry you are right I updated the post. \$\endgroup\$ Commented Feb 7 at 21:01
  • \$\begingroup\$ It might help to understand which device uses built-in CAN and which device used the MCP2515, to know if the problem is the MCU with built-in CAN controller, or the MCU with MCP2515, to know if the problem is with the MCP2515 or the SPI communication with it. \$\endgroup\$
    – Justme
    Commented Feb 7 at 22:26
  • \$\begingroup\$ MCP2515 is connected to raspberry. PIC32 uses the internal can controller and its working without problem. \$\endgroup\$ Commented Feb 8 at 7:27

1 Answer 1

2
\$\begingroup\$

I found a poor soldering at the tranceiver power supply. It is work now.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ In that case you can close your question and mark it as resolved, so people don't spend too much time figuring out an already solved issue. Glad it works for you now. \$\endgroup\$
    – GNA
    Commented Feb 8 at 9:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.