Trouble getting jetson nano and mcp2515 to work properly

I’ve been attempting to get some mcp2515 modules to work with my jetson nano for some time now and have been facing a lot of difficulties. I have a waveshare can hat (this one) and a few mcp2515 breakouts (like these) and have tested both on other devices and they worked flawlessly. I have gone through a number of the forum posts on here to try to correctly configure a dts for the mcp2515, but still no luck.

I have a jetson nano dev kit running jetpack 4.4 and another running 4.5 (tried to use the existing mcp251x config in 4.5), but have arrived at strange issues. From what I can tell, it initializes the module fine and gives no indication of errors, but when I try to send a frame it sends maybe a couple before throwing ‘no buffer space available’ and cannot receive anything at all. Its constantly in active error mode, but I cannot tell what wrong. Can anyone with more experience on interfacing the mcps and the jetson nano help me out here? Not sure what other details I should provide to provide better context, please let me know what else would be useful!

Sorry for the late response, is this still an issue to support?

hi @kayccc

Oh yeah, this is still very much an issue to support. I have kept trying, but have had no success. However I do have a bit more information now. When I was testing I noticed that SPI1 might not have initialized correctly and that might be the root of my problems. Particularly, with ‘dmesg | grep spi’, I got the following:

[ 9.750367] mcp251x spi0.0: MCP251x didn’t enter in conf mode after reset
[ 9.760558] mcp251x spi0.0: Probe failed, err=16
[ 9.760571] mcp251x: probe of spi0.0 failed with error -16
[ 10.786394] mcp251x spi1.0: MCP251x didn’t enter in conf mode after reset
[ 10.796071] mcp251x spi1.0: Probe failed, err=16
[ 10.802478] mcp251x: probe of spi1.0 failed with error -16

Hi stwoudie,
Please follow steps mentioned in doc for MCP to configure properly:

But being remote, we could not proceed to resolve communication issue yet.
You can check the latest comments on this thread also:

Hi @shgarg,

I tried following those instructions initially, but I had no luck. Additionally, I’ve followed the thread you linked as well and tried using the dts people have linked there along with the seed studio build system, but had the exact same results. I assume whatever is causing the error log I showed above is the source of my problem (I hope haha). Do you know what might cause that error? I assumed ‘err=16’ indicated that a failure occured with error code 16 and I tried to look up online what that means, but did not find anything.