I have some troubles with the configuration of CAN2 peripheral on imx6ull.
I need to use not standard pins (pin 32 as CAN2_TX and pin 34 as CAN2_RX). To do that I modified my device tree as following:
disabled ‘uart2’ which normally uses pins 32 and 34;
enabled can2 peripheral;
redeclared pinctrl_flexcan2 node to use pin32 and pin34 as new TX and RX pins.
If you see device with ifconfig -a, then your DT settings should be OK.
Did you configure bit timing with: ? ip link set can2 type can bitrate XXXXXX
Without connecting any external device, perhaps just CAN transceiver and nothing else; after you up interface, make sure both TX and RX stay high. Then try sending any message like this cansend can2 123#
TX should start toggling (RX as well, driven by transceiver) with minimum pulse width T matching bitrate (F=1/T), you have set.
Then manually I set can1 down, I change bitrate, and then up again. Just to be sure.
ip link set can1 down
ip link set can1 type can bitrate 125000
ip link set can1 up
They I try to send a messagge with PCANview (I have external usb-can device), but messages arrives only on can0. Moreover, RX led of can1 remains off while RX led of can0 blinks. Same thing if I try to send messages from colibri using cansend.
this is our schematic. This is for CAN2 (so can1 device into SoM), and circuit is equal for CAN1 (so can0 device into SoM).
LEDs and CAN analyzer are too slow to detect this activity. Use scope instead.
The fact is CAN2 on Colibri IMX6ULL SODIMM pins 32+34 is working well. Are you sure it is not your PCB issue? Did you try with other SOM instance, perhaps this one has damaged pads?
With LEDs and PCANView I can see when can0 sends a message. I read perfectly message 123#.
I tried now with another SoM but nothing. Same result.
Maybe I have problem on the external CAN chip. I want to try using the module on Colibri Evaluation board (if possible) and an external chip which I am already using for CAN communication. I will be back with results.