0

I am facing a CAN bus communication problem to which I don't know the reason. I have MCP2515 as a SPI->CAN interface connected to the MCP2551 (in the past) and now the TI's HVD256.

Currently, the components are connected as depicted in the schema. SCK, MOSI, MISO and CAN-CS are connected to the appropriate pins of the AVR.

schematic + oscilloscope screenshots

The problem lies in the fact, that the CAN communication sometimes work and sometimes does not while the latter prevails significantly. Sometimes I even get no response from the MCP2515 while the MISO (green) signal looks like on the left oscilloscope screenshot.

I've been even recommended to try using pull-downs or pull-ups on the MISO line (which I've never encountered before); then the signal is on the right.

Any idea why that may be happening?

There is also a secondary problem - in the rare case the MCP2515 communicates well over the SPI, content of all registers make sense, there is no signal/data on the TX pin which goes out to the consequent MCP2551 (or HVD256). The output is either 0V or +5V but no data.

Many thanks for any clues!!

-blume-

Blume
  • 1
  • 1

1 Answers1

0

Do you have resistors between CanLo/CanHigh on the line? It should be there at least on one end of the line. See here: SN65HVD256 with MCU example schematics

As far as I know, the pull-downs are supposed to be there by the specification. 120 Ohm resistor is a common nominal, I guess.

OpalApps
  • 149
  • 13
  • Sure I do. There is one in the USB2CAN reader interfacing my PC and another one at the end of the bus on the device. The CAN actually works well now, just the voltage levels on the SPI between the microcontroller and the MCP2515 are weird.. But still, if somehow works, just don't wanna be surprised once it's out of the lab.. – Blume Aug 12 '16 at 14:20