rmann@mouse:~$ sudo devmem2 0x0c303010 w 0xc400
/dev/mem opened.
Memory mapped at address 0xffff94c4d000.
Value at address 0xC303010 (0xffff94c4d010): 0x400
Written 0xC400; readback 0xC400
rmann@mouse:~$ sudo devmem2 0x0c303018 w 0xc458
/dev/mem opened.
Memory mapped at address 0xffff93468000.
Value at address 0xC303018 (0xffff93468018): 0x458
Written 0xC458; readback 0xC458
$ sudo modprobe can
$ sudo modprobe can_raw
$ sudo modprobe mttcan
$ sudo ip link set can0 up type can bitrate 500000 dbitrate 1000000 berr-reporting on fd on
$ rmann@mouse:~$ cat /proc/device-tree/mttcan\@c310000/status
okay
Unfortunately, examining the TX pin while executing
$ cansend can0 123##1abcdabcd
TX always stays high. Similarly,
rmann@mouse:~$ candump -x any
outputs nothing, even though there is a steady stream of CAN data coming into the RX pin.
Are you using the devkit or custom board for Orin Nano?
What’s your Jetpack version in use?
Do you want to verify internal loopback test for CAN?
Or you’ve connected any other CAN device?
Could you share the block diagram of your connection and use case?
I’ve tried the loopback test instructions, but I don’t get anything from candump.
Suspiciously, those instructions call for shorting the pins together (which I tried), but I thought that was an internal configuration (loopback on), meaning it didn’t go out to the pins.
In any case, nothing changes on the TX pin output.
I’ve also tried connecting a VESC SIX motor controller with CAN. I can see its messages on the oscilloscope and on the RX pin on the dev kit board, but nothing in the software.
Yeah, that’s exactly what I did, but just to be sure, I do it again (note, I have to use sudo):
rmann@mouse:~/jetson/jetsonUtilities$ sudo ip link set can0 down
rmann@mouse:~/jetson/jetsonUtilities$ sudo ip link set can0 type can bitrate 500000 loopback on
rmann@mouse:~/jetson/jetsonUtilities$ sudo ip link set can0 up
rmann@mouse:~/jetson/jetsonUtilities$ candump can0 &
[1] 10219
rmann@mouse:~/jetson/jetsonUtilities$ cansend can0 123#abcdabcd
rmann@mouse:~/jetson/jetsonUtilities$
Yes, the wave share can transceiver is connected. I had to solder it to the board directly because I couldn’t find an appropriate right-angle socket, and the placement of the pads is under the module (very poorly considered, that).
I’m not sure what the error at the RX means.
If it is an internal Loopback, does it matter what’s connected to the pins?
Oh, another note: there’s no thermal isolation for the ground pin on the CAN header, making it very hard to solder.
After a couple of reboots (trying to persist the configuration), I finally have it working. I don’t know what I’ve done differently, because I’ve tried each one of these steps several times.