dcan1 on BBB only transmits data when loopback mode is enabled and also does not receive data

Hi all,

we bought a BBB a few days ago. I tried to run a simple can send/receive demo. I’m using the “out of the box” angstrom linux distribution and activated the dcan1 according to this tutorial: http://www.embedded-things.com/bbb/enable-canbus-on-the-beaglebone-black/ . The overlay is placed and the driver comes up as expected. My ifconfig shows the can0 if and I could start a simple onboard loopback demo. Now we ordered a HS-CAN transceiver (microchip MCP2551) and setup a simple circurit and connected the CAN bus to an external stimmulator. Now to my problem: I only can send data on the bus (even on the relatet pin on BBB) when I initialize the CAN with loopback mode enabled, otherwise only the first frame can be seen via a oscilloscope but the bus tracer reports an error. All attempts to write again on the bus fail afterwards. Dmesg tells me “c_can_platform 481d0000.d_can can0: setting BTR=1c0e BRPE=0000”.

The next problem is, when I start in loopback mode, I only can send on the bus, but when I trigger a frame with the external bus stimulator I can see the frame circulating on the bus (again only with the oscilloscope) but no reception at the RXD pin of my BBB.

Does this sound familar to any one? Thank you in advance

Today I tried the same procedure with Ubuntu on my BBB, but the behavior is still the same.

By the way, the bus termination is correct!

Thanks

I finally solved my problem! First there was an electrical issue that the resistor between the 5V transistor RXD line and my 3.3V Rx input of the BBB was simply to high and cut down the whole signal. After using a more appropeate one the signal was seen on the bus via a oscilloscope. After a little playing around with the can driver I recognized that the loopback AND the listen-only parameters have to be set to OFF to get the right Rx and Tx behavior of the BBB running. sending and parallel receiving of Can frames works perfect!!