Cannot find device "can0"

Hello everyone.

I use an iMX6 with Iris, I want to generate CAN frames, but i think a problem in the SPI bus blocks me.

root@colibri-imx6:~# dmesg | fgrep -i mcp
[1.337502] mcp251x spi3.0: Cannot initialize MCP2515. Wrong wiring?
[1.345747] mcp251x spi3.0: Probefailed, err=19

root@colibri-imx6:~# ip link set can0 type can bitrate 125000
Cannot find device "can0"

root@colibri-imx6:~# zcat /proc/config.gz | grep CONFIG_CAN_MCP251X

I have :

Linux colibri-imx6 4.9.144-2.8.5+g5758a8e 

does this version support the CAN bus ?

hi @ZakariaZID

There is no SPI CAN transceiver on the Iris Board. That’s why the can0 device is not loaded.

Best regards,

Hi @jaski.tx

is there another way to generate CAN frames?

Best regards

No, you need the CAN Transceiver.

Hi @ZakariaZID!

Since the Iris Carrier Board has no CAN transceiver, you can try using the internal CAN controller on the iMX6 (FlexCAN):

However, you’ll still need a transceiver such as the MCP2551 to correctly establish CAN communication.

if I buy Viola Plus Carrier Board, will it work with the iMX6 without the need for other components?

Hi @gustavo.tx

if I buy Viola Plus Carrier Board, will it work with the iMX6 without the need for other components?

Best regards.

No, there will no can communication as there is no CAN Transceiver on Viola, Iris or Aster. Either you buy a Colibri Evaluation Carrier Board or get an external CAN Transceiver.

Further if you are interested for having a module which work out of Box for CAN Communication, then I can recommend you Apalis iMX6 with Ixora Carrier Board.

Best regards,

Hi @ZakariaZID, just a quick comment: For CAN to work, you need 2 individual components: A CAN controller and a CAN transceiver.

The first generates the logic while the second handles the physical signals responsible for its communication.

As mentioned by my colleagues, the Colibri iMX6 feats an internal CAN controller, but still a transceiver is needed.

The Colibri Evaluation board feats both components: The controller (through SPI, MCP2515, which uses the additional driver), and the transceiver (MCP2551), which can be used through any of the (both) available CAN controllers (FlexCAN in the SoC or MCP2515).

You’ll be able to access the CAN_RX and CAN_TX signals on the X9 connector on the Viola Carrier Board. But to connect to other CAN devices, you’ll need an external transceiver (e.g. the mentioned MCP2551) to obtain the differential CAN signal (CAN_H and CAN_L).