CAN configuration and suspension issues

Hi everyone,
I’m experiencing an issue with the CAN configuration on jetson tx2 nx. When I configure the CAN interface and then execute the suspend operation, the system crashes. However, if I don’t initialize the CAN module, the suspend function works fine. I’ve double-checked the CAN configuration steps against the official documentation, but couldn’t identify the root cause. Has anyone encountered similar problems or have suggestions on what might be going wrong?
CAN configuration:
sudo busybox devmem 0x0c303020 w 0x458
sudo busybox devmem 0x0c303018 w 0x400
sudo modprobe can
sudo modprobe can_raw
sudo modprobe mttcan
sudo ip link set can0 type can bitrate 500000
sudo ip link set up can0

Hi 2652280495,

Are you using the devkit or custom board for TX2-NX?
What’s the Jetpack version in use?

Please share the full serial console log at this moment for further check.

The TX2-NX uses a custom board of model Y-C7, with jetpack version 4.6.6. The serial console log is:
[2596,143087] Internal error:Accessing user space memory outside uaccess.h rout ines: 96000005[#1] PREEMPT SMP
[2596.148584] usb 1-3: usb_suspend_both: status 0
[2596,157577] Modules linked in: mttcan can_dev can_raw can bnepfuse xt_conntrack ipt_MASQUERADE [ 2596.164967] usb 1-2.2:usb_suspend_both:statys 0
[2596,170937] nf_nat_masquerade_ipv4
[2596.174439] nf_conntrack_netlink nfnetlinkxt_addrtype iptable_fllter iptable_nat nf_conntrack_ipv4 nf_defrag
[2596.193953] overlay
[2596.196149] binfmt_misc userspace_alert nvgpu ip_tables x_tables
[2596.202346]CPU: 4 PID: 7285 Comm: systemd-sleep Not tainted 4.9.337-tegra #1
[2596.209497] Hardware name: lanai-3636 (DT)
[2596.213602] task: 000000006fc7447c task.stack: 00000000c0567593
[2596.219546] PC is at 0xffffff80011e2cd4
[2596.223394] LR is at platform_pm_suspend+0x68/0x78
[2596.228196]PC : [] lr:[] pstate: 60400045
[2596.228958] usb 1-2: usb_suspend_both: status 0
[2596.240144] sp: ffffffc0a0ae39do
[2596.243465] x29:ffffffc0a0ae39d0 x28:ffffffc0efe7b8c8
[2596.248816] x27:ffffff8009fe9000 x26:0000000000000002
[2596.254167] x25:ffffff8009ed8058 x24:ffffffcoefe7b870
[ 2596.258979] usb usb1: usb_suspend_both: status 0
[2596.263961] x23:ffffff8009433a28 x22:0000000000000000
[2596.269311] x21:ffffff800878aBd0 x20:0000000000000002
[2596.274661] x19: 0000000000000000 x18:0000000000000001
[2596.280010] x17: 0000000000000000 x16: 0000000000000000
[2596.285360] x15:ffffffffffffffff x14:ffffff800a1a4e18
[2596.290709] x13:ffffff800a1a4a49 x12:0000000000000000
[2596.296059] x11: 0000000000000006 x10: 0000000000000408
[2596.301406] x9: 0000000000000000 XB:ffffffc0f705434f
[2596.306770] x7 :0000000000000000 X6:00000012f20ef847
[2596.312120] x5: 00ffffffffffffff x4: 0000000000000000
[2596.317470] x3:ffffff8009433a28 x2:ffffff80011e2cb8
[ 2596.322819] x1 : 0000000000000002 x0:ffffff8008788938
[2596.328167]
[2596.329660]Process systemd-sleep (pid: 7285, stack 1imlt = 0x00000000c0567593)
[2596.336984] Call trace
[2596.339446] [<000000002464eBa7>] 0xffffff80011e2cd4
[2596.344337] [<00000000c7b2c86f>] platform pm_suspend+0x68/0x78
[2596.350185] [<00000000dfffe777>] dpm run_cal1back+0x5c/0x228
[2596.355857] [<00000000308e6b97>] device_suspend+0x190/0x438
[2596.361617] [<000000007b1adf50>] dpm_suspend+0x110/0x368
[2596.366943] [c000000005eB62623>] dpm_suspend_start+0x70/0x80
[2596.372618][<0000000091301afB>] suspend_devices_and_enter+0xe4/0x320
[2596.379074] [<00000000b91d5b91>] pm_suspend+0x35c/0x748
[2596.384312] [<0000000075186956>] state_store+0x98/0x118
[2596.389551] [<00000000538884c4>] kobJ_attr_store+0x14/0x28
[2596.395051] [<000000003be28e29>] susfs_kf_ur1te+0x58/0x80
[2596.400461] [<00000000bBfobo5e>] kernfs_fop_urite+0xfc/0x1eo
[2596.406135] [00000000ba1f73c7] 2596.411372] [0000000010419eb9]tsste0x48/0x118
[2596.416435] [<00000000c51398c6>] Sus urlte+0x5c/0xc8 2596.421412] [<0000000060bd1c9d>] e10_svc naked+0x34/0x38
[2596.426738] —[end trace 67c30a948771386c]—

It seems there’s the memory related issue during suspend.

Would you hit the issue if you just load mttcan driver but not setup CAN interface?
(i.e. just run modprobe but not ip link command)

Do you have the devkit to reproduce the similar issue to clarify if the issue is specific to your custom carrier board?

Thank you for your reply. The problem has been found now. Because two CAN nodes were enabled in the device tree, but the device only has one CAN

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.