IgZero Posted March 2, 2017 Posted March 2, 2017 How to connect the mcp251x driver on the OrangePI PC? I make new kernel (Debian 8.7 (jessie)) with can-bus modules and mcp251x module. Has connected MCP2515 according to the following scheme. GND (PIN30 OPI) ---> GND MCP2515 VCC+5V (PIN2 OPI ---> VCC MCP2515 PC00 (PIN19 OPI) ---> SI MCP2515 PC01 (PIN21 OPI) ---> SO MCP2515 PC02 (PIN23 OPI) ---> SCK MCP2515 CE00 (PIN24 OPI) ---> CS MCP2515 PA20 (PIN37 OPI) ---> INT MCP2515 All modules are loaded, but the can0 device doesn't appear. modprobe can modprobe can-dev modprobe can-bcm modprobe can-gw modbrobe mcp251x Quote root@orangepipc:~# lsmod Module Size Used by gpio_sunxi 8269 0 mcp251x 9153 0 can_gw 7733 0 can_bcm 11498 0 can_dev 6843 1 mcp251x can 21136 2 can_gw,can_bcm root@orangepipc:~# dmesg [ 210.831078] can: controller area network core (rev 20090105 abi 8) [ 210.831364] NET: Registered protocol family 29 [ 214.099942] CAN device driver interface [ 218.361848] can: broadcast manager protocol (rev 20090105 t) [ 221.844740] can: netlink gateway (rev 20101209)
IgZero Posted March 6, 2017 Author Posted March 6, 2017 The problem is solved, thanks zador.blood.stained
juda Posted March 14, 2017 Posted March 14, 2017 Hi, I try to use mcp2515 with OrangePiPlus legacy Armbian (5.27). I have module mcp251x in my image, I try to load it using modprobe (as IgZero did), but there is no can0 interface created. No message in dmesg ("probed" etc.). Please help me how to configure the FEX file, as legacy images does not use the overlays. I have the same HW connection as IgZero, including INT on the PA20. Thanks.
IgZero Posted March 16, 2017 Author Posted March 16, 2017 The mcp2515 driver managed to be started only under mainline kernel.
juda Posted March 16, 2017 Posted March 16, 2017 Yes, I tried a lot of different configuration of FEX file without success. The problem maybe is, that the platform data structure inside the driver contains pointer to the next structure, which is unable to initiate within startup process using BIN configuration and it remains null. Probing of driver is interrupted then. So I modified the driver itself a little and now is my mcp2515 working in loopback mode. I have to port my raspberry-based host board to the orangepi and test the real communication with car. 1
IgZero Posted March 22, 2017 Author Posted March 22, 2017 On 16.03.2017 at 2:27 PM, juda said: Yes, I tried a lot of different configuration of FEX file without success. The problem maybe is, that the platform data structure inside the driver contains pointer to the next structure, which is unable to initiate within startup process using BIN configuration and it remains null. Probing of driver is interrupted then. So I modified the driver itself a little and now is my mcp2515 working in loopback mode. I have to port my raspberry-based host board to the orangepi and test the real communication with car. Hi! You can share your version of the driver for mcp2515?
juda Posted March 22, 2017 Posted March 22, 2017 I will try to prepare diff patch file on this weekend. I never did it. but have to learn something new .....
IgZero Posted March 22, 2017 Author Posted March 22, 2017 54 minutes ago, juda said: I will try to prepare diff patch file on this weekend. I never did it. but have to learn something new Ok. I'll be waiting.
Recommended Posts