MCP2518FD - CAN receive works, sending does not work

Hi Nvidia Team

We have a custom Thor carrier board with two MCP2518FD controllers connected over SPI (SPI1 and SPI3). The controllers get recognized and receiving can packages works as expected (using candump and cangen).

[ 3374.598987] mcp251xfd spi0.0 can0: MCP2518FD rev0.0 (-RX_INT -PLL -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD o:40.00MHz c:40.00MHz m:20.00MHz rs:17.00MHz es:0.00MHz rf:17.00MHz ef:0.00MHz) successfully initialized.
[ 3374.610608] mcp251xfd spi2.0 can1: MCP2518FD rev0.0 (-RX_INT -PLL -MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD o:40.00MHz c:40.00MHz m:20.00MHz rs:17.00MHz es:0.00MHz rf:17.00MHz ef:0.00MHz) successfully initialized.

However, when sending packages, it does not work. The behavior is similar to our previous topic with the Orin NX: MCP2518FD not working with JetPack 6.0 GA

We tried to use the same driver source file spi-tegra114.c that we used with JetPack 6.x versions, but we do not get it compiled for JetPack 7.

Has there been a solution from your side regarding this old bug? Any suggestions what we can try?

Edit: we have found a similar topic:

Thank you.

Kind regards

Hi sevm89,

What’s the Jetpack version in use?

Have you configured the pinmux for SPI before use?
Do you verify SPI loopback test working before porting MCP2515FD?

Please share the full dmesg and device tree for further check.

Hi KevinFFF

We are currently testing it with the JetPack 7.1 EA version. The Pinmux is configured for SPI and the MCP2518FD Controller gets correctly initialized. We did not test the SPI loopback.

Please find here the files:

device-tree.txt (330.0 KB)

dmesg.txt (77.2 KB)

Let us know if you need further information.

thank you.

Hi KevinFFF

After applying the patch from Jetson orin nano SPI Speed not changing - #9 by KevinFFF it is working. Can you explain why this is needed?

That is a known issue for SPI driver in JP6.x.
It seems the patch is missing in JP7.x, please let me check this with internal team.

Hi KevinFFF

Is the patch now included in JetPack 7.1 GA?

This patch is not included in Jetpack 7.1GA.
I’m still working with internal team for the missing patch and the alternative method for the CS related issue.