Sparkfun CAN-BUS Shield Won't Init

Hi folks!

I’m having some trouble working with a sparkfun canbus shield v1.3 and arduino uno R3.

When trying to run any code with the shield the init always fails:
Any line like

Canbus.init(CANSPEED_500)

will return false.

I have tried Sparkfun’s Library, Seed’s library and a few other variants but they all fail to init. Varying speed settings as well.

In the seed version of the code it always prints:
“Enter Normal Mode Fail!!”
after calling CAN.begin(CAN_500KBPS)

Any help figuring this out would be appreciated!

A couple things I’m not 100% clear on but hoping someone can help me clarify:

  • Should I be able to successfully init without anything connected to can hi & lo?
  • Is a terminating 120ohm resistor required to be added on this version of the shield for init success? I see no mention on needing one added for this shield but several other variants seem to.

The return from init() tells you if the Arduino has been able to talk to the MCP2515 via the SPI interface.

Connections to the hi/low or termination resistors are only needed once you have successfully got through the init() stage and need to transmit/listen for CAN bus messages to/from another device.

mikb55:
The return from init() tells you if the Arduino has been able to talk to the MCP2515 via the SPI interface.

Connections to the hi/low or termination resistors are only needed once you have successfully got through the init() stage and need to transmit/listen for CAN bus messages to/from another device.

Thank you! This info helped me figure out that i had a hardware problem - I hunted down another shield that completed init just fine with the same code.

In case it's helpful to anyone else, it appears the minimum pins required to be connected for init to complete (sparkfun shield on uno R3) are reset, 5v, a ground, d10, d11, d12, d13. This will obviously not allow everything to work but was helpful for me troubleshooting the base step.