Enabling and Testing CAN on colibri iMX8X

Good morning,

I’m trying to test the communication using CAN between 2 modules, colibri iMX8X. However, I can’t see any signal coming from the pins (SODIMM_63/55).
When using the colibri eval kit v3.2, the datasheet says I need to use the conector X12. But no signal appears in U2(CAN_L) or U7(CAN_H) too.

So far, i’ve made the changes in device tree (&flexcan2{status=“okay”}; ), build the CAN interface,
build the container with can-utils and tried the cansend and candump. As described here.

I tried to open the jp4/jp5 and check the x38. But there’s no signal there too.

What am i missing?

edit: More details

  • # ip -details -statistics link show can0

4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can promiscuity 0 minmtu 0 maxmtu 0
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 500000 sample-point 0.875
tq 25 prop-seg 37 phase-seg1 32 phase-seg2 10 sjw 1 brp 1
flexcan: tseg1 2…96 tseg2 2…32 sjw 1…16 brp 1…1024 brp_inc 1
flexcan: dtseg1 2…39 dtseg2 2…8 dsjw 1…4 dbrp 1…1024 dbrp_inc 1
clock 40000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 parentbus platform parentdev 5a8e0000.can
RX: bytes packets errors dropped missed mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0

  • After using cansend, the counter stays the same.

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Good morning,

To enable and test CAN communication on your Colibri iMX8X module, let’s ensure that all necessary steps are correctly implemented:

  1. Device Tree Configuration: Double-check that the device tree is properly modified to enable the CAN interface. For the Colibri iMX8X, ensure the &flexcan2 node has its status set to “okay” and that the correct pin configuration is applied for SODIMM pins 63 and 55.

  2. CAN Transceiver: It’s crucial to have a CAN transceiver connected to the module, as the CAN controller alone cannot transmit signals. The transceiver ensures the electrical specifications of the CAN bus are met.

  3. Evaluation Board Setup: On the Colibri Evaluation Kit V3.2, verify that the jumpers JP4 and JP5 are correctly configured to route the FlexCAN signals to the CAN transceiver. You might need to remove these jumpers and use jumper wires to connect the FlexCAN RX/TX signals to the transceiver.

  4. CAN Interface Configuration: Use the ip link command to bring up the CAN interface and set the correct bitrate. For example:

    ip link set can0 up type can bitrate 500000
    

    Make sure to replace can0 with the appropriate interface name if it differs.

  5. Testing with can-utils: Utilize cansend and candump from can-utils to test the CAN communication. Ensure both modules are on the same CAN network and configured with the same bitrate.

  6. Signal Verification: If no signal is observed, recheck all connections and configurations. Ensure the CAN transceiver is powered and correctly interfaced with the module.

If these steps do not resolve the issue, it might be helpful to review the device tree and hardware setup for any discrepancies or errors. Also, confirm that the CAN utilities are correctly installed and configured on your system.

I hope this helps you get your CAN communication up and running!

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Colibri IMX8X receiving some CAN messages but not others.

Update nº2:
I’ve disabled and bypassed the MCP2515 and connected the pins SODIMM 55 and 63 directly to connector X38.
So when using the command cansend can0 123#DEADBEEF, there’s a brief signal in SODIMM 55 and the can0 goes to BUS-OFF state and the LED’s 11/12 stays ON indefinitely.

Update nº3:
There’s no signal in X2(CAN_H/CAN_L) yet.
After trying to send anything through SODIMM 55/63, RX get TX signal mirroed.