# Forum: µC & Digital Electronics RFduino and SparkFun CAN bus shield (MCP2515)

 Author: fuesel (Guest) Posted on: 2015-07-18 20:52

Rate this post
 0 ▲ useful ▼ not useful
Hi everyone

I am having real trouble with my RFduino/MCP2515 combination. I
originally tried the code with libraries on an Arduino Leonardo and it
worked after some tries. I tried to use the exact same code with my
RFduino, but it failed. I could see the data sent over SPI with my logic
analyser to the MCP2515 and it responding to the RFduino. I tested by
writing registers, then read it back and there is no problem at all. But
I cannot receive any CAN messages, in fact the flags in the RX status
are never set. I now try to use it in listen-only mode for debugging.
What bothers me is that I had a look on the SPI data exchange with my
logic analyser and it is slightly different: I send the same data, but
get back a lot of chatter with my Leonardo, but not with the RFduino.
(See attached pictures) Else I also used the same configuration data.
Just to be sure I recalculated the CNF3,2,1 data with the Microchip
Timing Calculator (and tried other settings). The only thing which is
different is the 3.3V supply from the RFduino vs the 5V from the
Leonardo. But the MCP2515 is rated down to 2.8V!

So in short:
MCP2515 works in terms of reading and writing registers and changing
mode
CAN reception works on my bike, but only with Leonardo.

Data
https://www.sparkfun.com/products/10039

If anybody has an idea what to try, I would be really grateful.

The code attached only depends on the SPI library, I wrote it to
eliminate any problems coming from the libraries I used.

• $formula (LaTeX syntax)$