Hi,
I am currently trying to bring up all peripherals on our custom base board for Verdin modules
and I am stuck at getting the CAN0 interface to work.
I am using the latest version from branch toradex_5.4-2.3.x-imx. The bus is terminated on both ends with a 120 Ohm resistor and I have already tried changing the two lines.
The kernel prints the following message during boot up:
~ # dmesg | grep mcp
[ 45.366109] mcp25xxfd spi2.0: spi_imx_setup: mode 0, 8 bpw, 2000000 hz
[ 45.366130] mcp25xxfd spi2.0: setup mode 0, 8 bits/w, 2000000 Hz max --> 0
[ 45.403142] mcp25xxfd spi2.0: MCP2517 successfully initialized.
After setting the bitrate and starting the interface I get the following message
~ # ip link set can0 type can bitrate 250000 fd off
~ # ip link set can0 up
[ 214.894638] mcp25xxfd spi2.0: Controller unexpectedly switched from mode 0 to 6
[ 214.895108] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[ 214.902450] mcp25xxfd spi2.0 can0: CAN Bus error experienced
Send a message results in the following output
~ # cansend can0 123#DEADBEEF
[ 169.237656] mcp25xxfd spi2.0 can0: CAN Bus error experienced
~ # [ 169.243436] NOHZ: local_softirq_pending 08
[ 169.248096] mcp25xxfd spi2.0 can0: CAN Bus error experienced
[ 169.253795] mcp25xxfd spi2.0 can0: bus-off
And I don’t receive a message sent by the other CAN module. The following image shows the output of the CAN tranceiver, decoded with the same bitrate.