msperl / linux-rpi

Other
22 stars 26 forks source link

question about config-example #11

Open ghost opened 4 years ago

ghost commented 4 years ago

Hello, I am trying to use socketcan with your project for my research.

I have connected MCP2517FD to Raspberry PI 3B+ as follows: GPIO9 -> MISO GPIO10 -> MOSI GPIO11 -> SCLK GPIO8 -> CS GPIO25 -> INT​

I have loaded compiled kernel 4.19.40ms7-v7+mcp25xxfd.tar.gz to my Pi. I've got two questions on next steps:

  1. config-example.txt has these lines: kernel=ms7/zImage overlay_prefix=msu7/overlays

Is that correct value for overlay_prefix? I notice elsewhere it gets defined as overlay_prefix=ms7/overlays/

  1. I can't see can0 device in the device list. How should I troubleshoot this? Are there any logs on Raspberry PI about failure to init can0 device that I should look for?

Thank you!

wdim0 commented 4 years ago

Hi,

yes, I've just discovered the same issue and managed to fix it: 1) the prefix is wrong (mistyped). It has to be "_overlayprefix=ms7/overlays/" 2) the name "mcp2517fd-spi0.0-can0" with dot after "spi0" is not going to work. I discovered this by looking to log of loader ("sudo vcdbg log msg" when "dtdebug=1" is in config.txt) - "002143.881: dtdebug: Failed to open overlay file 'ms7/overlays/mcp2517fd-spi0.0-can0'". Notice that the trailing .dtbo is missing => the loader doesn't tolerate any extra dots in overlay names. To fix this, just change name of overlay files - change dot to underscore ("mcp2517fd-spi0.0-can0.dtbo" -> "_mcp2517fd-spi00-can0.dtbo") and change the name in config.txt also ("_dtoverlay=mcp2517fd-spi00-can0")

See you

Martin