Hello,recently ,when I try to connect xavier can0 to can1 with another device(that can convert ttl to can and convert can to ttl) by canbus,i got some trouble.
First,i input command like this:
Sudo busybox devmem 0x0c303000 32 0x0000C400
Sudo busybox devmem 0x0c303008 32 0x0000C458
Sudo busybox devmem 0x0c303010 32 0x0000C400
Sudo busybox devmem 0x0c303018 32 0x0000C458
Sudo modprobe can
Sudo modprobe can_raw
Sudo modprobe mttcan
Sudo ip link set can0 type can bitrate 500000
Sudo ip link set can1 type can bitrate 500000
Sudo ip link set up can0
Sudo ip link set up can1
And then ,I open a new terminal to input new command like this
And then ,I open another terminal to input command like this
Cansend can1 111#11
But I found that I can not got any message from candump can0 when I use can send can1 111#11. So I open another terminal inputting “sudo ip-d -s link show can0” and “sudo ip -d -s link show can1” to see details. And I found this:
Now I don’t know how to check these canbus errors.
And I don’t know how to correct it .
I really need some help,please.
Please use berr-reporting on:
$ ip link set can0 type can bitrate 500000 berr-reporting on
and increase kernel log level
$ dmesg -n 7
Errors will show up in kernel logs.
Thank you for replying my question .
I did exactly what you said and I found this :
I don’t understand these errors . Could you help me again? Thank you very much!
Nodes on your bus are not able to communicate and throwing errors that leads to bus off.
It may be because of not setting exact bitrate of 500kbps. If the nodes other than jetson are running with 500kbps, then these errors are expected.
You can remove it using pllaon clock.
Thank you again,I am sorry that I can’t understand what your website show because I learned Linux not too much time. I don’t use Jetson Xavier NX or Jetson AGX Xavier. I just use Jetson Xavier .
Can you show me how to do using command ? Or can you show me in a way that beginner can understand ?
Thank you very much !
I’m very sorry to trouble you.
you should change the clock sources for verification,
please refer to developer guide, Configuring Clocks. you may check [To use PLLAON as clock source] session for the steps.
there’s Building the NVIDIA Kernel session to include the procedure to build the NVIDIA kernel, and you may also check Flashing a Specific Partition to flash a specific partition instead of flashing the whole device by using the command line switch
Hello,I tried what you said and now when I use dmesg to check logs , there is no warning or error. But I still can’t get message . What should I do now?
You can see can1 didn’t receive any message
And when I try to send message by can1, I found errors
could you please configure CAN interface settings, please assign all of these for both the controllers.
$ ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
$ ip link set up can0
$ ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on
$ ip link set up can1
here’s also an example to broadcasting a can data packet,
$ cansend can0 123#abcdabcd
Hello,thank you for replying me. I did what you said,and I still can’t receive message
what’s the receiving side shows? you should receiving a can data packet by
$ candump can1
there’re different tools (i.e.
cangw ) that can be used for various filtering options.