Jump to content

How to connect the mcp251x driver on the OrangePI PC?


IgZero

Recommended Posts

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)
 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines