Xavier cansend cannot update data

Hello,
I have problem with CAN communication on Nvidia Jetson Xavier, I have followed CAN Enable this tutorial:

output setting CAN Enable:
nvidia@nvidia-desktop:~$ ifconfig
can0: flags=193<UP,RUNNING,NOARP> mtu 72
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 68
nvidia@nvidia-desktop:~$ ip -d -s link show can0
24: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 72 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
link/can promiscuity 0
can <BERR-REPORTING,FD> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 498701 sample-point 0.870
tq 26 prop-seg 33 phase-seg1 33 phase-seg2 10 sjw 10
mttcan: tseg1 2…255 tseg2 0…127 sjw 1…127 brp 1…511 brp-inc 1
dbitrate 2021052 dsample-point 0.736
dtq 26 dprop-seg 6 dphase-seg1 7 dphase-seg2 5 dsjw 5
mttcan: dtseg1 1…31 dtseg2 0…15 dsjw 1…15 dbrp 1…15 dbrp-inc 1
clock 38400000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 0 0 0 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
RX: bytes packets errors dropped overrun mcast
0 0 0 0 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0

But I have the problem:
When I use CANSEND in the first iteration, it has no problem. But, when it runs for the next iteration, CANSEND was not updating the data.
I have tried random CANSEND, But I still got the same result.

Could anyone help me to solve this problem?
Thank you for your help

output my result:images output - Google Drive

Hi,
To understand the issue more, can you please use try below steps and give us output:

  1. set up can again (there should not be bus errors in can statistics by reloading mttcan)
  2. try sending one by one using cansend:
    cansend can0 551#67.92
    provide details of “ip -d -s link show can0”
    cansend can0 6B1#61.5A.B2
    provide details of “ip -d -s link show can0”
    cansend can0 5D4#64.47.72.24.F1.52.8D.64
    provide details of “ip -d -s link show can0”

Hi,

Thanks for Replaying. I try sendding one by one using “cansend”, But i sill got the same result. my fersion jetpack 4.4.1. there is something wrong with my CAN-BUS setting:

  • 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 can_dev
  • sudo modprobe mttcan
  • sudo ip link set can0 type can bitrate 500000 sjw 127 dbitrate 2000000 dsjw 15 berr-reporting on fd on
  • sudo ip link set up can0
  • sudo ip link set can0 txqueuelen 1000

output result: images output (cansend) - Google Drive

Hi,
Can you try sending FD frame type:
cansend can0 6B1##1abcdabcdabab

Also can you share kernel dmesg logs while sending messages. Please increase kernel log level and then share.

Hi,
I try sending "cansend can0 6B1#1abcdab " after sending messages. in the kernel log there are problems namely “mttcan_handle_bus_err: 52508 callbacks suppressed” and “mttcan c310000.mttcan can0: Acknowledgment Error Detected”. message error:

[ 915.892601] mttcan_handle_bus_err: 52508 callbacks suppressed
[ 915.892896] mttcan c310000.mttcan can0: Acknowledgement Error Detected
[ 915.893048] mttcan c310000.mttcan can0: IR 0x8000000 PSR 0x77b
[ 915.893184] mttcan c310000.mttcan can0: Acknowledgement Error Detected
[ 915.893354] mttcan c310000.mttcan can0: IR 0x8000000 PSR 0x77b
[ 915.893494] mttcan c310000.mttcan can0: Acknowledgement Error Detected
[ 915.893626] mttcan c310000.mttcan can0: IR 0x8000000 PSR 0x77b
[ 915.893759] mttcan c310000.mttcan can0: Acknowledgement Error Detected
[ 915.893888] mttcan c310000.mttcan can0: IR 0x8000000 PSR 0x76b
[ 915.894050] mttcan c310000.mttcan can0: Acknowledgement Error Detected
[ 915.894180] mttcan c310000.mttcan can0: IR 0x8000000 PSR 0x77b

Detail Kernel Log: log kernel (after Send Message) - Google Drive

you need to use 6B1##1abcdab.
FD frame uses ##.

“cansend can0 6B1##1abcabc” sending message error:

“stuff error”

Kernel Log and result data: kernel Log - Google Drive

which transceiver are you using?
Can you check if transceiver supports FD mode?
Also, what errors are you getting without FD frame?
cansend can0 6B1#615AB2

my transceiver sn65hvd230: https://www.ti.com/lit/ds/symlink/sn65hvd230.pdf?ts=1610506486439&ref_url=https%253A%252F%252Fwww.google.com%252F

I check in the datasheet (transceiver sn65hvd230), not supports FD mode

I have the same problem “not update data in cansend mode” canreceiver not a problem

please for the solution

Hi,
Sorry for late reply.
If the transceiver is not supporting FD mode, do not configure in CAN settings.
remove fd on and keep it normal.
ip link set can0 up can0 bitrate 1000000
and then try sending can messages.

[quote=“shgarg, post:11, topic:165480”]
ip link set can0 up can0 bitrate 1000000

thanks for your solution. my problem about “cansend cannot update data” is solved using snhvd230 can bus transceiver.