Can1 not appear on Apalis imx8

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

Did you like my answer?

:+1: :-1:


Hello Tarek,

It looks like you’ve successfully enabled can0 but are having trouble with can1 on your Apalis iMX8 with the Ixora carrier board running Torizon.

Here are a few steps to troubleshoot and enable can1:

  1. Check Device Tree Overlay:
    Ensure that the device tree overlay you are using (apalis-imx8_mezzanine_can_overlay.dtbo) actually includes the configuration for both can0 and can1. Sometimes, overlays might only configure one CAN interface. You might need to create or modify an overlay to include both CAN interfaces.

  2. Verify Device Tree Configuration:
    You can check the device tree source to ensure that both CAN interfaces are enabled. Look for entries similar to the following in your device tree source files:

    &can1 {
        status = "okay";
    };
    
    &can2 {
        status = "okay";
    };
    

    Ensure that both can1 and can2 nodes are set to “okay”.

  3. Check Pin Multiplexing:
    Ensure that the pins for can1 are correctly configured in the device tree. The pin multiplexing settings should be correct for the CAN1 interface. For example:

    &iomuxc {
        pinctrl_can1: can1grp {
            fsl,pins = <
                MX8QXP_CAN1_TXD_CAN1_TX 0x40000000
                MX8QXP_CAN1_RXD_CAN1_RX 0x40000000
            >;
        };
    
        pinctrl_can2: can2grp {
            fsl,pins = <
                MX8QXP_CAN2_TXD_CAN2_TX 0x40000000
                MX8QXP_CAN2_RXD_CAN2_RX 0x40000000
            >;
        };
    };
    
  4. Rebuild and Apply the Device Tree:
    After making sure the device tree source is correct, rebuild the device tree blob and apply it to your system. Ensure that the new device tree blob is correctly placed in the /boot directory and referenced in the overlays.txt file.

  5. Check Kernel Modules:
    Ensure that the necessary kernel modules for CAN are loaded. You can check this by running:

    lsmod | grep can
    

    You should see modules like can, can_raw, can_dev, etc.

  6. Check System Logs:
    Check the system logs for any errors related to CAN interfaces. You can use dmesg or journalctl to look for relevant messages:

    dmesg | grep -i can
    journalctl -k | grep -i can
    
  7. Manual Interface Bring-Up:
    Sometimes, manually bringing up the interface can help. Try the following command:

    ip link set can1 up type can bitrate 500000
    

If after these steps can1 still does not appear, there might be an issue with the hardware configuration or a deeper issue in the device tree setup. In such a case, you might want to reach out to Toradex support for more detailed assistance.

Best regards,
[Your Name]

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

Device Tree Overlays Torizon imx7 CAN bus, can0 not found.