Hello,
Been having problems trying to get CAN working on the Jetson tx2
It has been flashed with jetpack 3.3 and tegra18_defconfig includes CONFIG_MTTCAN = m.
The CAN transceivers used are mcp2561 and we have made sure that all the connections are not loose, and the pins are connected to the right place, following various diagrams seen in these forums in the past.
The commands we use to setup the CAN are:
sudo modprobe can
sudo modprobe can-raw
sudo modprobe mttcan
sudo ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting o$
sudo ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting o$
sudo ip link set up can0
sudo ip link set up can1
Everything looks fine at this point. can0 and can1 show up when we do ifconfig. However, when cansend can0 5A1#11.22.33 is run, this is the output on ifconfig:
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP NOARP MTU:72 Metric:1
RX packets:5 errors:2 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:40 (40.0 B) TX bytes:0 (0.0 B)
Interrupt:171
Candump does not have any output.
dmesg:
[ 1914.000250] mttcan c310000.mttcan can0: Bitrate set
[ 1914.034140] mttcan c320000.mttcan can1: Bitrate set
[ 1914.079463] mttcan_controller_config: ctrlmode 30
[ 1914.084294] mttcan c310000.mttcan can0: Bitrate set
[ 1914.117927] mttcan_controller_config: ctrlmode 30
[ 1914.122732] mttcan c320000.mttcan can1: Bitrate set
[ 1915.297722] mttcan c310000.mttcan can0: Bit0 Error Detected
[ 1915.303440] mttcan c310000.mttcan can0: IR 0x8000000 PSR 0x75d
[ 1915.309460] mttcan c310000.mttcan can0: entered error warning state
[ 1915.315893] mttcan c310000.mttcan can0: entered error passive state
[ 1915.322582] mttcan c310000.mttcan can0: entered bus off state
[ 1915.328609] mttcan c310000.mttcan can0: Bit0 Error Detected
[ 1915.334424] mttcan c310000.mttcan can0: IR 0xb800000 PSR 0x7e5
Also, when using the oscilloscope, the jetson is constantly outputting 3.3V through the Can TX pins, leading us to think that the messages are not even getting sent.
Is there anything we could do to solve this and get out jetson communicating through the can bus?