passiw
Posts: 3
Joined: Thu May 22, 2014 9:53 pm

Re: CAN controller

Thu May 22, 2014 9:57 pm

I've got the same error :?
ip -s -d link show can0:
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 10
link/can
can state ERROR-ACTIVE restart-ms 0
bitrate 500000 sample-point 0.875
tq 125 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000

passiw
Posts: 3
Joined: Thu May 22, 2014 9:53 pm

Re: CAN controller

Fri May 23, 2014 4:44 pm

Thanks to Gerd, i found out that "ERROR-ACTIVE" means that everything's OK, if there would be a problem it would show "BUS-OFF" :roll:

BigSjedow
Posts: 1
Joined: Sun May 25, 2014 12:13 pm

Re: CAN controller

Sun May 25, 2014 12:25 pm

Hi,

I'm new here and I've read alot in this thread but can't get my rpi with the pican to work.

I followed everything in the post by jtosey on Sat Mar 29, and added the extra parameters as suggested by tz1 on Mar 30, i don't get any errors but when i try the candump it doesn't show me anything. I connected it to the canbus of my car with the db9 connector. For this i followed some instructions found elsewhere. Pin 2 can low, pin 3 can gnd and pin 7 can high.
(Connected to volvo s60 rti power connector brown gnd, green can low and white can high)

Any hints on how to proceed and debug this?

Regards,
Kim

sun-tracker
Posts: 6
Joined: Sun May 25, 2014 11:02 pm

Re: CAN controller

Sun May 25, 2014 11:08 pm

Kim (BigSjedow), did you find jtosey's post to be comprehensive enough to follow?
I'm in the same boat as you but have mostly been biding my time waiting for a straightforward and effective how-to on getting the PICAN to work. I tried the instructions at http://skpang.co.uk/catalog/pican-canbu ... -1196.html but overwriting the Raspbian kernel kills my wifi capability and I do not have access to wired internet. I'm sorta shocked SK Pang does not host a frozen distro that we can use out-of-the-box with the PICAN...

mikexu
Posts: 11
Joined: Tue Apr 08, 2014 1:21 pm

Re: CAN controller

Tue May 27, 2014 9:07 am

Update:

The PiCAN board works now on my rpi under mcp2515, although the details of "can0" are still showing "can state STOPPED"...
But I can send and receive CAN messages. Seems just fine!!
Special Thanks to Martin!!

For those who might be looking for help, try my settings posted on page 21 (Tue May 06, 2014 12:04 pm) or quoted below. It worked for me just like that.

Remember:
1. Jumper 3 (JP3) needs to be shortened for high-speed CAN.
2. Use the 3-pin terminal for CAN, and DB9 for OBDII only (check the schematic for jumper selection).
mikexu wrote:Hi, I'm trying to get the SKPANG PiCAN http://skpang.co.uk/catalog/pican-canbu ... -1196.htmlboard working on the rpi. After checking through all the posts here, I'm still stuck at some point. The current problem is, can0 state is STOPPED when I show:

Code: Select all

$ ip -details link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 10
    link/can 
    can state STOPPED restart-ms 100 
    bitrate 125000 sample-point 0.875 
    tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
    mcp2515: tseg1 2..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
    clock 8000000
RPi has a kernel version: 3.10.36+. I used compiled modules from tz1 directly in the raspbian, without having the kernel recompiled.
Other setup:
1. /etc/modules:

Code: Select all

$ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

snd-bcm2835

i2c-bcm2708
i2c-dev

# MCP2515 configuration with /INT on GPIO25 and 16MHz clock
spi-bcm2708
can
can-dev
can-raw
can-bcm
spi-config devices=\
bus=0:cs=0:modalias=mcp2515:speed=10000000:gpioirq=25:pd=20:pds32-0=16000000:pdu32-4=0x2002
:force_release

mcp2515
2. Blacklist:

Code: Select all

$ cat /etc/modprobe.d/raspi-blacklist.conf 
# blacklist spi and i2c by default (many users don't need them)

#blacklist spi-bcm2708
blacklist i2c-bcm2708
blacklist mcp251x
although I don't have mcp251x module anywhere on the rpi.

3. /etc/network/interfaces:

Code: Select all

auto can0
iface can0 inet manual
    pre-up /sbin/ip link set can0 type can bitrate 125000
    up /sbin/ifconfig can0 up
    down /sbin/ifconfig can0 down
4. ifconfig:

Code: Select all

$ ifconfig
can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          UP RUNNING NOARP  MTU:16  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:10 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
So, when I try

Code: Select all

candump any,0:0,#FFFFFFFF
in one terminal, and

Code: Select all

cansend can0 7DF#0201050000000000
in another terminal, nothing happens....

In dmesg, everytime when I bring up the can0:

Code: Select all

sudo ifconfig can0 up
, it shows:

Code: Select all

mcp2515 spi0.0 can0: writing CNF: 0x03 0xb5 0x01
. But nothing else happens...

Anyone has any idea what's going wrong here? I'd really appreciate any help here!!

FSteckel
Posts: 2
Joined: Tue May 27, 2014 9:19 am

Re: CAN controller

Tue May 27, 2014 9:35 am

Hello Folks,

I've been following this thread for a few days now, but I must admit, I give up. I want to use my RPi to listen to a CAN-BUS and display relevant information via composite-video and openVG.
Got the openVG working like a charm. Then I tried setting up the CAN bus. Used skpangs board and tested with their precompiled kernel. Worked fine both ways. But with this kernel openVG wouldn't work ("vchiq could't be initialized", whatever that means...).

Now I set up a new sd card with a fresh raspbian, updated, upgraded and used rpi-update.

Now I'd like to set up can. From all of those posts I am not completely shure whether I need to compile my own kernel for that or not. I really appreciated msperls lessons learned from Apr22nd. Did the first step, worked. He then referenced drivers and a spi-confic module, that I have no idea where to get.
Is there a walkthrough like, download this, install that...? Or does anyone of you have a working kernel on an updated raspbian? With so many people around here, I'm shure, somebody got it working fine...
Sorry I'm kinda lost. Where do i begin?
Thanks very much for your help!

FSteckel

sun-tracker
Posts: 6
Joined: Sun May 25, 2014 11:02 pm

Re: CAN controller

Fri May 30, 2014 3:04 am

2. Use the 3-pin terminal for CAN, and DB9 for OBDII only (check the schematic for jumper selection).
Why is this? Aren't the CAN High and CAN Low pins also present on the DB9 connector?
With an Arduino I have no troubles talking to CAN via DB9.

FSteckel
Posts: 2
Joined: Tue May 27, 2014 9:19 am

Re: CAN controller

Wed Jun 04, 2014 7:55 am

Finally got it to work with jtosey and tz1's posts from Sat Mar. 29.
Thanks guys. Just one thing: Do I need to be careful not to make upgrades or rpi update in the future or will this functionality be unaffected?
Has anyone experience in accessing the output from candump in a seperate c program?

mikexu
Posts: 11
Joined: Tue Apr 08, 2014 1:21 pm

Re: CAN controller

Wed Jun 18, 2014 1:42 pm

From the PiCAN schematics, I guess the DB9 connector would work if the jumpers are soldered correctly.
sun-tracker wrote:
2. Use the 3-pin terminal for CAN, and DB9 for OBDII only (check the schematic for jumper selection).
Why is this? Aren't the CAN High and CAN Low pins also present on the DB9 connector?
With an Arduino I have no troubles talking to CAN via DB9.

User avatar
bonzadog
Posts: 236
Joined: Wed Apr 25, 2012 9:40 am
Location: Rietberg/Germany

Re: CAN controller

Thu Jun 19, 2014 8:47 am

19.6.2014
Hello,
I want to implement an external CAN controller.
For about €25 you can get the AVR-CAN https://www.olimex.com/Products/AVR/Dev ... t/AVR-CAN/
which you wil need to programme the CAN Driver (they have examples)since the AVR-CAN is made explicitly
for CAN . In fact the CAN Protocoll alone is hardly used in the automation/Cars industry - the use protocoll J1939 which "sits" above the CAN.
You may need to get some test equipment to see what is happening, especially for timing and drop errors.
There are some non expensive solutions in Internet.

Hope this helps

BD

yvesdm3000
Posts: 2
Joined: Sun Jul 06, 2014 2:15 pm

Re: CAN controller

Sun Jul 06, 2014 2:27 pm

Just a little followup on my experiences of getting a PiCAN working on my Raspbian. I tried it on a "3.12.23+" kernel that I've cross-compiled on my intel machine. I could not get it to work at all, not with the mcp251x driver, nor with mcp2515 and had fun with a lot of kernel oops stuff. Every time the end-result is that the interface "can0" is always missing.

I now installed the "3.10-3-rpi" precompiled kernel and headers, compiled the mcp2515async driver, compiled the spi-config module and it looks a lot better, but I still need to connect it on a canbus to receive data, but at least the interface is up and nothing is complaining when I run candump.

I hope this post saves some others from wasting time trying it the way I did.

-Yves

monkeydafist
Posts: 1
Joined: Sun Jul 20, 2014 5:05 pm

Re: CAN controller

Sun Jul 20, 2014 5:16 pm

Hello everyone,

I have read through this thread starting from posts dated early 2013, it appears that everyone are experiencing common issues:

- kernel builds not matching, update too frequently
-mcp251x, mcp2515, mcp2515a driver confusion
- can0 not coming up

I have experienced all of the above issues and am to no avail in getting can0 up and running on 3.12.22+ after depmod -a runs successfully, using modprobe, none of the drivers appear to exist as posted in the http://lnxpps.de/rpie/raspi-anleitung.txt.

My understanding is that, given a kernel "kernel.img" and a set of matching drivers "something.ko". After putting the kernel.img in the /boot directory of the Rpi, and then doing $ demod -a on the matching set of drivers, upon reboot, one should see "can0" in $ifconfig.

Can any kernel be installed to the latest raspbian release? If so, are there matching sets of kernel + drivers for plug and play integration?

My ultimate goal is simply to get two raspberry pi's to talk over CAN with one another in an isolated system. A full out solution is not needed as only two devices will be on the bus and fully controlled by myself; though this forum appears to offer the best support community to do this. I am open to other alternatives.

Thanks!

yvesdm3000
Posts: 2
Joined: Sun Jul 06, 2014 2:15 pm

Re: CAN controller

Sun Jul 20, 2014 6:07 pm

I tried about everything I could except starting to debug at source-level on 3.12.XX. I could not get it to work, the best I could was that everything loads, everything detected fine but can0 refuses to comes up. I then downgraded to the 3.10 kernel and things started to look a lot better. I suspect there is something in 3.12 that conflicts or lacks some implementation bits to make the can0 interface work as a network interface.

No worries, the 3.10 kernel is installable through apt-get.

-Yves

stenniswood
Posts: 6
Joined: Thu Jan 02, 2014 5:26 pm

Re: CAN controller

Wed Jul 23, 2014 3:50 pm

If you have worked through these problems and built a working kernel. I encourage you to look at Beyond Kinetics, design contest. We are offering $100 for anyone who can make it work with the PiCAN board. The only difference is the BK PiCAN board uses IRQ #22 (instead of 25) and also has RTS flow control signals for speed optimization (this part is optional).

Enjoy!

Steve
Beyond Kinetics, Inc.

stenniswood
Posts: 6
Joined: Thu Jan 02, 2014 5:26 pm

Re: CAN controller

Wed Jul 23, 2014 9:01 pm


George Pio G. Aclan
Posts: 1
Joined: Mon Jul 28, 2014 1:47 am

Re: CAN controller

Mon Jul 28, 2014 1:52 am

Good day everyone,

I am new to the raspberry pi and I'm still learning the basics. Anyways, I have a project in building a home automation system using pi as the server. The architecture is like a SCADA system where there are local controllers to be performed by arduino due's.The following are my questions to you guys who are experts:

1. Is it possible to interface a Pi to a Due using CAN-bus?
2. Can i use the shield developed by SK Pang for the RPi model B+?
3. Can you guys send me the basics on how to program the Pi for CAN-bus?

Thank you and hoping for positive responses.

Sincerely,

George Pio G. Aclan

sun-tracker
Posts: 6
Joined: Sun May 25, 2014 11:02 pm

Re: CAN controller

Sat Aug 02, 2014 6:33 am

All,

I think I'm very close to having a functional PICAN setup.
From the multiple posts in this thread and the http://lnxpps.de/rpie/ page, everything seems to be looking good as far as configuration and bringing up the can0 interface.

Now, I just need your HELP in understanding the solder joints (SJ1, SJ2, SJ3) and Jumpers (JP1, JP3) on the board.
Naturally I am using the schematic here: http://skpang.co.uk/catalog/images/rasp ... _rev_B.pdf

SK Pang makes another CANBus devices (not for the RPI) and provided this image for it: http://skpang.co.uk/catalog/images/mbed ... config.png
Seeing as how the pin references are identical to the PICAN schematic, should I be soldering the left sides of each of the solder joints? Do I need to do anything with the jumpers?
My preference is to use the DB9 cable since it carries CAN_H and CAN_L lines...

Bottom Line: Please help me determine what I need to do with the Solder Joints and Jumpers on the PICAN board!


UPDATE: I have a fully functional PICAN now (so far). Candump works without issue. I soldered the left sides of each of the 3 pads below the DB9 connector to use the OBD-II pin configuration. Working great at this time.

bertr2d2
Posts: 97
Joined: Wed Aug 08, 2012 10:12 pm

Re: CAN controller

Tue Aug 05, 2014 7:00 am

Updated Linux Kernel modules can be found here: http://lnxpps.de/rpie
Tested on SKpang PICAN
Easy to build CAN-Bus interface:
http://lnxpps.de/rpie

ggnnamita
Posts: 7
Joined: Mon Aug 11, 2014 2:27 pm

Re: CAN controller

Mon Aug 11, 2014 2:38 pm

Hello everyone.

This is Namita here. i have been trying to get my GNUBLIN can board running with the raspberry pi. The circuit for the Gnublin board can be found on this page below.

http://wiki.gnublin.org/index.php/MCP2515_CAN

I followed the instructions on this page below to load my kernel modules:

http://lnxpps.de/rpie/

Everything seems to be working fine except one small problem. When I send a message after the " ip link set can0 up type can bitrate 500000" using the cansend only this message is displayed on the receiving device. All the other messages i send after this are not to be seen. neither does my candump command seem to work. I am not sure but is the problem related to my buffer or something?

I am stuck!! please help

Namita. :(

Andreas Munoz
Posts: 5
Joined: Tue Aug 19, 2014 6:57 am

Re: CAN controller

Tue Aug 19, 2014 7:17 am

Hi everyone,

I've been following this forum for a few time and I've tried most of the solutions you are sharing on it, but I can't make CAN works. The better result I obtained was to transmit info over SPI but the MCP2515 never transmit CAN. I have now the Kernel version 3.12.20+, but I'm thinking on starting over with a fresh image. Can anyone please enumerate the steps to achieve the CAN transmission from a fresh image? I've seen that the latest modules are for Kernel version 3.12.22+. How can I change the Kernel version in a right way? I made it with rpi-ipdate, but I don't know if this command is correct.

Thanks you! Best regards!

Andreas Muñoz

Janssuuh
Posts: 6
Joined: Fri Aug 29, 2014 2:57 pm

Re: CAN controller

Fri Aug 29, 2014 3:21 pm

Hi all,

Like a lot of us I'm following this topic for the last few months.
I bought this SKPang board and still trying to get it to work the way I'd prefer.

At this point the two terminal test is working (terminal1 cangen can0, terminal2 candump any, with loopback on).

My main goal is to connect my Raspberry to my Audi A4 infotainment bus and get can signals from my RNS-E nav system which I'd like to translate into Raspberry key-presses.

I found the github location to the repository files https://github.com/yegorich/can-utils and tried to make a change to the candump executable en recompile with gcc.

In terminal I did:

Code: Select all

gcc candump.c -o candump
This is where I got bashed on
'undefined references to fprint_canframe'
.
I found these references in the lib.h file.

After some trial and error commands I got output on this (on Ubuntu machine!!):

Code: Select all

gcc candump.c -o candump -L/location_to_lib lib.c
(lib.c is available as wel)

Now if I try this directly on Raspberry I get a bunch of new errors!!! But apperently it is not posible to just copy my new Ubuntu file over the Raspberry one (in usr/bin), cause the I get this error:
'cannot execute binary file'
:(
- Am I missing problems in different Kernel versions?
- Does'nt Raspberry Kernel provide the default <include> files?
- Do I need to re-insmod or so?
- Is there just an other way to translate can codes to key-presses (I know these keboard.xml files, but don't see any option to directly put can-codes in there.)

Thanks very much in advance...

bertr2d2
Posts: 97
Joined: Wed Aug 08, 2012 10:12 pm

Re: CAN controller

Sat Aug 30, 2014 11:22 am

Janssuuh wrote:Hi all,

Like a lot of us I'm following this topic for the last few months.
I bought this SKPang board and still trying to get it to work the way I'd prefer.

At this point the two terminal test is working (terminal1 cangen can0, terminal2 candump any, with loopback on).

My main goal is to connect my Raspberry to my Audi A4 infotainment bus and get can signals from my RNS-E nav system which I'd like to translate into Raspberry key-presses.

I found the github location to the repository files https://github.com/yegorich/can-utils and tried to make a change to the candump executable en recompile with gcc.

In terminal I did:

Code: Select all

gcc candump.c -o candump
The git is old - please use the official https://gitorious.org/linux-can/can-utils.
If you want to compile it yourself please use autogen.sh to generate or use the existing Makefile. If you are going to cross compile the code please have a look at http://elinux.org/Raspberry_Pi_Kernel_Compilation .
BTW http://lnxpps.de/rpie/rpi-can-3.12.22+.tar.bz2 contains quite new bins of can-utils.

Regards

Gerd

PS: The mentioned tar archive on http://lnxpps.de/rpie was downloaded more than 200 times - the feedback is nearly zero.
Easy to build CAN-Bus interface:
http://lnxpps.de/rpie

Janssuuh
Posts: 6
Joined: Fri Aug 29, 2014 2:57 pm

Re: CAN controller

Mon Sep 01, 2014 9:10 pm

Thanks Gerd!

I downloaded the gitorious files, tried to add a little printf command and used (my first) the make command.
The make file compiled a new candump which I copied over the old one on usr/lib.

Did the cangen / candump trick again and works like a charm!!!

Next steps:
- edit the candump.c to be able to emulate key presses on certain can inputs.
- connect audi nav system and test if inputs are being messured (I use the can h, can l pins on the board and still asuming there's no need / available pin on the nav for gnd), might have to change 500k bitrate and loopback settings aswell.

To be continued :-)

ipeukes
Posts: 2
Joined: Mon Sep 01, 2014 8:34 pm

Re: CAN controller

Mon Sep 01, 2014 9:31 pm

Hi there,

i'm trying to get my Pi ( REV 1 )connected to an arduino using a self made can Interface with the mcp2515 and mcp2551.
The interfaces itself work, I can connect two arduinos without a any Problems.
But when I connect one of it to the Pi the sending arduino just lights up the leds connected on can-txd and can-rxd of the 2515.
This normaly only happens if the sending arduino is not connected to the bus or is the only device.
On the Pi side I crosscompiled a 3.12.26+ and got all modules compiled and they all load without any error.

lsmod

Code: Select all

root@raspi:~# uname -a
Linux raspi 3.12.26+ #1 Sun Aug 31 00:40:21 CEST 2014 armv6l GNU/Linux

root@raspi:~# lsmod
Module                  Size  Used by
mcp251x                 7248  0
spi_config              8568  0
can_bcm                 9732  0
can_raw                 4972  0
can_dev                 5560  1 mcp251x
can                    18228  2 can_bcm,can_raw
spi_bcm2708             3728  0
snd_bcm2835            13596  0
snd_pcm                52180  1 snd_bcm2835
snd_page_alloc          2708  1 snd_pcm
snd_seq                34932  0
snd_seq_device          3640  1 snd_seq
snd_timer              13584  2 snd_pcm,snd_seq
snd                    35796  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
dmesg:

Code: Select all

bcm2708_spi bcm2708_spi.0: master is unqueued, this is deprecated
bcm2708_spi bcm2708_spi.0: SPI Controller at 0x20204000 (irq 80)
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
CAN device driver interface
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
spi_config_register: device description: bus=0:cs=0:modalias=mcp2515:speed=10000000:gpioirq=25:pd=20:pds32-0=16000000:pdu32-4=0x2002:force_release
spi_config_register:spi0.0: registering modalias=mcp2515 with max_speed_hz=10000000 mode=0 and gpio/irq=25/195
spi_config_register:spi0.0:platform data:cea64c40: 00 24 f4 00 02 20 00 00 00 00 00 00 00 00 00 00  .$... ..........
spi_config_register:spi0.0:platform data:cea64c50: 00 00 00 00                                      ....
mcp251x spi0.0: probed
mcp251x spi0.0: CNF: 0x03 0xb5 0x01
The interupt is also registered but never gets a hit:

Code: Select all

root@raspi:~# cat /proc/interrupts
           CPU0
  3:      43921   ARMCTRL  BCM2708 Timer Tick
 16:          0   ARMCTRL  bcm2708_fb dma
 32:     694934   ARMCTRL  dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1
 52:          0   ARMCTRL  BCM2708 GPIO catchall handler
 65:          3   ARMCTRL  ARM Mailbox IRQ
 66:          1   ARMCTRL  VCHIQ doorbell
 75:          1   ARMCTRL
 77:       5762   ARMCTRL  bcm2708_sdhci (dma)
 80:         36   ARMCTRL  bcm2708_spi.0
 83:         20   ARMCTRL  uart-pl011
 84:       7767   ARMCTRL  mmc0
195:          0      GPIO  mcp251x
FIQ:              usb_fiq
Err:          0
The Interface is up:

Code: Select all

root@raspi:~# ip -s -d link show can0
3: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 10
    link/can
    can state ERROR-ACTIVE restart-ms 0
    bitrate 125000 sample-point 0.875
    tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
    mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
    clock 8000000
    re-started bus-errors arbit-lost error-warn error-pass bus-off
    0          0          0          0          0          0
    RX: bytes  packets  errors  dropped overrun mcast
    0          0        0       0       0       0
    TX: bytes  packets  errors  dropped carrier collsns
    0          0        0       0       0       0
When I set the interface up with the loopback option I can send and receive frames localy, but candump never gets anything from the arduino nor does a listening arduino ever get something from the Pi.

I use this bash-script to load the module and set up the can0 device:

Code: Select all

root@raspi:~# cat loadcan.sh
#!/bin/bash
modprobe can
modprobe can-dev
modprobe can-raw
modprobe can-bcm
modprobe spi-bcm2708
insmod spi-config/spi-config.ko devices=bus=0:cs=0:modalias=mcp2515:speed=10000000:gpioirq=25:pd=20:pds32-0=16000000:pdu32-4=0x2002:force_release
modprobe mcp251x
/sbin/ip link set can0 up type can bitrate 125000
ifconfig can0 up
I guess the last ifconfig isn't necessary but I found it in some howtos.

The only Thing I noticed is that the arduino uses this for the cfg Registers of the mcp2515:

Code: Select all

#define MCP_16MHz_125kBPS_CFG1 (0x03)
#define MCP_16MHz_125kBPS_CFG2 (0xF0)
#define MCP_16MHz_125kBPS_CFG3 (0x86)
whereas the mcp251x module uses other values:

Code: Select all

mcp251x spi0.0: CNF: 0x03 0xb5 0x01
Is there anything special about the REV 1 that I missed out? The GPIO Header layout should be the same on the pins used, right?

Any ideas where the problem is or what I can try to make it work?
I'm realy out of ideas now.

Thank you

Ingo

ipeukes
Posts: 2
Joined: Mon Sep 01, 2014 8:34 pm

Re: CAN controller

Tue Sep 02, 2014 5:01 am

Wooot.... just made it work.

Silly me took the wrong resistor on the voltage divider on the rxd. As the arduino doesn't need it, it was the only difference in the circuit so I double checked it.


Thank you anyway for your work here, it surely helped al lot.

Return to “Interfacing (DSI, CSI, I2C, etc.)”