-1

I am communicating using a Canbus port on my TS-7250-V3 embedded controller board.

At first, I was using my code which implements the Linux SocketCAN interface, and saw continuous bus activity once I sent out the first Can packet. I had one device connected to the bus for testing, and removed it so I could see there the constant transmissions were coming from.The external device was removed and there was still activity on the bus.

I then removed my code, rebooted the board and tried the following commands.

ip link set can0 up type can bitrate 1000000

And sent one message: cansend can0 7Df#03010c

After that command, there is continuous can activity on the bus.

Can Bus Output on Scope

Please help and offer suggestions/comments.

Thanks!

Coleman

1 Answers1

1

"Activity" can mean a lot of things. You say that you set the baudrate to 1000000 = 1MHz. But does your scope picture look like correctly transmitted binary data at 1MHz = 1us = 1/10 of a 10us square?

No, it rather looks like 6us long pulses followed by a 1us change of polarity. 6 consecutive bits in a row on a CAN bus is an error frame. Meaning that the bus doesn't work, there's some manner of hardware problem. Your CAN listener (mandatory tool) should tell you this. Modern scopes can also help in decoding CAN frames.

(Hint: don't use AC triggering for digital logic signals. Place the DC trigger level somewhere in the middle of your expected signal level voltage range. For CAN that is 2.5V +/-1V.)

I had one device connected to the bus for testing
The external device was removed and there was still activity on the bus.

You need two devices to form a CAN bus. If there is no node to ACK a message, you will get error frames. Please consult this beginner's guide: What are the most common causes of CAN bus communication errors?

Lundin
  • 195,001
  • 40
  • 254
  • 396