MattCostamagna
-
Posts
13 -
Joined
-
Last visited
Reputation Activity
-
MattCostamagna reacted to garinus in MCP2518FD not working with OrangePI
Hi,
after having performed some tests I managed to have the mcp2518fd working with Armbian and Orange PI zero.
In attachment there is a patch that works with the current version.
The driver is the same as in the main kernel version:
https://github.com/torvalds/linux/tree/master/drivers/net/can/spi/mcp251xfd
after compiling the kernel it is necessary to add the following custom overlay in /boot/overlay-user
/dts-v1/; /plugin/; / { compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; fragment@0 { target-path = "/clocks"; overlay { #address-cells = <1>; #size-cells = <1>; can0_osc_fixed: can0_osc_fixed { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <20000000>; }; }; }; fragment@1 { target = <&pio>; overlay { can0_pin_irq: can0_pin_irq { pins = "PA10"; function = "irq"; bias-pull-up; }; }; }; fragment@2 { target = <&spi1>; overlay { #address-cells = <1>; #size-cells = <0>; status = "okay"; mcp2515 { reg = <0>; compatible = "microchip,mcp2518fd"; pinctrl-names = "default"; pinctrl-0 = <&can0_pin_irq>; spi-max-frequency = <10000000>; interrupt-parent = <&pio>; interrupts = <0 10 2>; /* PA10 IRQ_TYPE_EDGE_FALLING */ clocks = <&can0_osc_fixed>; status = "okay"; }; }; }; }; In my case the interrupt pin is on PA10 and the crystal on mcp is 20MHz, change them if necessary.
copile it with armbian-add-overlay, then after the reboot launch the following commands:
ip link set can0 type can bitrate 500000
ip link up can0
where 500000 is the bitrate of your canBus.
It is possible to test the connection with:
cansend can0 123#1122334455667788
or
candump can0
mcp2518fd.patch
-
MattCostamagna got a reaction from _r9 in Armbian a real FLOSS project? A chitchat between users
Hi @TRS-80, I'm the other guy of the "we" pronoun.
The fact that my colleague is asking for help in a forum that is supposed to help people having trouble making stuff working seems pretty normal to me, even if the target is to make a commercial product.
Open source projects (like Armbian) rely on a community of people helping each other out. I've never seen anybody on StackOverflow reply with "If you don't know how to do it, just hire somebody who does".
Armbian is a very nice product with a well made documentation and we (at work) are using it on different projects because we think it's stable and reliable, and we always found this fourm and its topics helpful to us to solve our problems.
Nobody is born knowing everything, so when I cannot figure how to solve a problem, I try finding a solution and if needed, I ask for help.
I hope you understand.
If nobody can't help us, we'll keep trying until we find a solution.
-
MattCostamagna reacted to cvxx in [solved] Headless wifi setup - conflict between NetworkManager and /etc/network/interfaces
Thanks for the idea
I found this solution to be more compatible: /etc/NetworkManager/NetworkManager.conf
Source: https://wiki.debian.org/NetworkManager#Wired_Networks_are_Unmanaged
-
MattCostamagna got a reaction from Werner in OrangePI Zero: Card stuck in programming state
Yes you are right, making a new image won't take me that long and it's something I've been considering since I saw the sort of problem I was facing.
I'll just leave this thread as unresolved so if someone in the future will manage to find a solution they can post the answer here.
Thanks a lot for your support.