Hi folks,
I and my teammates are currently working with Jetson Nano Devkit 4GB. We want to connect that Jetson with multiple STM32 via MCP2515 drivers but the problem is Jetson unable to transmit but able to receive data. And the Jetson stops receiving any data after transmit until we run sudo ifconfig can0 down
then sudo ifconfig can0 up
. We experimented it with both candump
+ cansend
and C program. Keep in mind that we already updated to the latest Jetpack version yesterday. Also the DTB file is automatically configured with jetson-io.py
script which is preloaded by Jetpack to enable MCP251x support. Then I manually modify the clock speed to 8MHz and recompile with dtc
.
Jetson Nano’s System Information
Here’s what ip -det link show can0
command says:
4: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UP mode DEFAULT group default qlen 10
link/can promiscuity 0
can state ERROR-ACTIVE restart-ms 0
bitrate 125000 sample-point 0.875
tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
mcp251x: tseg1 3..16 tseg2 2..8 sjw 1..4 brp 1..64 brp-inc 1
clock 8000000numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
Also we spotted that the MCP2515 has its interrupt pin successfully attached to Jetson Nano, here’s what /proc/interrupts
says:
CPU0 CPU1 CPU2 CPU3
299: 13 0 0 0 GPIO 200 Edge mcp251x
In case you wondering, here’s the dmesg
message:
[ 8.065539] mcp251x spi0.0 can0: MCP2515 successfully initialized.
Experiment Result
So we ended up purchased another identical Jetson Nano to do experiment. Here’s the result:
- STM32 to STM32: Working both direction
- STM32 to Jetson: Working
-
Jetson to STM32: Not working, seems stuck on kernel side, repeat this multiple times cause Jetson to throw error
write: no buffer space available
- Jetson to Jetson: Not working at all, seems stuck on kernel side too
We Borrowed an Oscilloscope, Here’s a Result
On this experiment, a single STM32 send RTR frame with interval around 1 second whereas Jetson send “Hello!” string with interval 5 milliseconds. Then we put the probe at CAN-H cable with ground at one of unused Jetson ground pin. We also change 5ms to 500ms on the second try but the result exactly same.
If you see those images carefully, you’ll realize that the Jetson is having seizure after I run sudo ifconfig can0 down
command. This supposed to not happen! We really confused what makes this occured. The pins are correctly and tightly connected, we checked them three times on both side. Oh… also this exactly the same with our new Jetson Nano.
Literally I scratched my head until get bald because of this anomaly. Dear moderators please help us out from this misery. Thanks!