2009-07-22 17:01:23     can4linux isn't sending the correct bytes

Document created by Aaronwu Employee on Aug 16, 2013
Version 1Show Document
  • View in full screen mode

2009-07-22 17:01:23     can4linux isn't sending the correct bytes

Ben Burleson (UNITED STATES)

Message: 77892   


I'm using the can_send program to aid in getting the CAN bus working on my CM-BF537E plugged into a Bluetechnix Dev board.  I have the CAN bus hooked up to a Tektronix Oscope with a bus analyzer module that displays the hex values of CAN messages.


I've tried a handful of different messages and none seem to send exactly what I expect to see on the scope.  I've even added a debug line in bf537funcs.c - CAN_SendMessage() to print the values of the message data bytes to compare those with what I'm seeing on the scope output.  They don't match!


For example, simply issuing can_send without parameters creates a data payload of  55 02 03 04 05 06 07 AA   These values are printed from the can4linux driver, so they're making it down into the kernel correct.


However, on the scope connected to the bus output, I see  55 02 13 04 02 0C 0E A9


It starts out OK, then something goes wrong.  I should note that the ID and DLC fields are correct.  (DLC is often incorrect with other message lengths, sometimes a value > 8!)


Has anybody else seen this behavior?  Is the Tektronix bus analyzer not interpreting the data stream correctly?


Thank you,






2009-07-22 23:04:16     Re: can4linux isn't sending the correct bytes

Sonic Zhang (CHINA)

Message: 77898   


What's your toolchain, uclinux release version?




2009-07-23 04:11:54     Re: can4linux isn't sending the correct bytes

Michael Hennerich (GERMANY)

Message: 77908   


I know the can_send and receive tools are confusing -

Take a look here:



It's also noted that the driver requires SCLK being exactly 125MHz in order to be in sync with a standard can baud rate.




There have been a view people using this driver successfully - try to search the forums.

You may find valuable information.


It's also noted that this driver is subject for removal and going be replaced with the new Linux CAN network driver.






2009-07-24 13:27:07     Re: can4linux isn't sending the correct bytes

Ben Burleson (UNITED STATES)

Message: 78016   


It was the system clock!  I had changed VCO_MULT up to 21 a while back, so the clock was at 131MHz.  I changed it back to 20 to produce 125MHz and the bus produces the proper output!


Thank you for your help!