[Apalis Eval Board] Can't communicate over CAN interfaces

I want to make both CAN interfaces communicate. I’m using the Apalis Evaluation Board with an iMX6Q 1GB module and a DB9 wire I personally soldered (and I verified multiple times that IC11 and IC14 RX/TX are connected).

At the system boot, I load the flexcan module. Once loaded, I can see the two CAN interfaces with ip a:

$ modprobe flexcan
$ ip a
    ...
3: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can 
4: can1: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
    link/can

Then, I set up both interfaces bitrate:

$ ip link set can0 type can bitrate 500000
$ ip link set can1 type can bitrate 500000
$ ip link set can0 up
$ ip link set can1 up

So far, so good. Now, I open two additional terminal windows and execute candump can0 (resp. can1) on each. On the initial terminal window, I execute cansend can0 123#11223344. Nothing appears in any of the windows… The CAN1 RX and TX leds are lit up, while only the CAN2 RX is lit up.

Furthermore, I added the option loopback on when initializing the CAN interfaces and this time, candump outputs something.

Any idea why this is not working? Thanks in advance.

HI @lei-reds

Thanks for writing to the Toradex Community!

Could you provide the version of the hardware (including carrier board) and software of your module?

Please share a picture of your cabling?
Did you use a termination resistor on the CAN Lines?

Best regards,
Jaski

Hi @jaski.tx,

I run Linux 5.4.91 (commit version 45d34a248bf3b7a88ffe0b613fb1f19ffcf62a3f) built with Buildroot 2021.02. Linux was built using the apalis_imx6 defconfig. The whole software runs on an Apalis iMX6Q 1GB V1.1B module, connected to an Apalis Evaluation Board V1.1C.

Here are some pictures of the cabling:

To answer your last question, no I did not use a termination resistor on the CAN lines. But is it relevant in my setup?

Regards,
Lucas

Hi @lei-reds

Thanks for the information and the pictures.
Yes, the termination resistor is very important and relevant for your setup.

Best regards,
Jaski