CAN-shield problem: no read/write functionality

Hi everyone,

It took me a while to get a compiled and successfully “initializing” CAN shield (since I was trying to run it with Arduino 1.0).

Nevertheless after trying for several hours, I don’t see anything really working, still.

My setup:

  • Arduino UNO R3 hardware

  • CAN shield (bought a week ago)

  • Arduino 0023 (so that I can claim no code has been changed on my side :slight_smile:

  • several different CAN libraries (and various versions of them):

http://code.google.com/p/sparkfun-ardui … ield-code/

http://www.skpang.co.uk/catalog/arduino … p-706.html

What works:

  • Serial display, SD card, LEDs and joystick

  • CAN init with almost all available CAN libs I found: “Canbus_V2” and “Canbus_V3” and “CANInterface”. The last one needed some change in CAN_CS, since it used the Arduino MEGA port settings.

What does not work:

  • Receiving any message over CAN… it is VERY silent :frowning:

  • Sending reports ‘success’ but nothing is received on the other end. Even worse, the transceiver on the other end simply reports error frames after any sending attempt. This gives me the indication that the 2515 chip works, but is misconfigured!

Test approach:

  • compile everything

  • try setting CAN speed according to rest of the CAN bus (in my case 125Kb), but also tested against Vector CANoe with 250 and 500.

  • try sending or receiving messages (no filters applied, using default settings from above mentioned CAN libraries)

Any thoughts? I’m entirely clueless. At least I want to know how I can get closer to identify the issue… at the moment its just a red brick to me :frowning:

Thanks for any hint!

GM.

ok, for everyone having the same issue:

I actually ran into a bunch of things here:

  1. resistor missing at the end of the CAN bus. This was caused by a broken resistor in my case (it was open basically)

  2. the receiver had issues, too. the sending of messages actually worked, but the receiver had an issue with it’s receive buffers

  3. the wiring was inverted at some point (after changing to many things at the same time)

So after all: the code and board works :wink:

The only thing that probably would have made things a lot easier: some specific documentation about the actual CAN setup in “end user language”. I had to dig into many supplier documents (such as the 2515 and 2551 documents) to get answers about the CAN configuration on the shield. In my case the resistor configuration was probably easy to understand from a hardware guys point of view, but not from a “software dude” :roll:

Hi,

Can you explain a bit more about the following

I actually ran into a bunch of things here:

  1. resistor missing at the end of the CAN bus. This was caused by a broken resistor in my case (it was open basically)

  2. the receiver had issues, too. the sending of messages actually worked, but the receiver had an issue with it’s receive buffers

  3. the wiring was inverted at some point (after changing to many things at the same time)

resistor, where?

I’m a bit confused as i dont unserstand that part.

I to have compiled everything ok (using 0023) but the CAN keeps quiet regardless of what i do :frowning:

When you look at the CAN bus specs, you will see that a successful communication needs the endpoints of the CAN bus itself to be setup correctly.

In my case I tested my CAN configuration with a 1-to-1 setup, where the resistors where missing.

Here is a discussion that tackles this issues and has an ASCII art diagram that shows the position of the resistors:

http://www.ccsinfo.com/forum/viewtopic.php?p=66046