linux-rpi icon indicating copy to clipboard operation
linux-rpi copied to clipboard

question about config-example

Open ghost opened this issue 6 years ago • 1 comments

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!

ghost avatar Aug 27 '19 19:08 ghost

Hi,

yes, I've just discovered the same issue and managed to fix it:

  1. the prefix is wrong (mistyped). It has to be "overlay_prefix=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-spi0_0-can0.dtbo") and change the name in config.txt also ("dtoverlay=mcp2517fd-spi0_0-can0")

See you

Martin

wdim0 avatar Sep 18 '19 11:09 wdim0