hi , on my TX2 devkit,
,i want to test can0 and can1 with two SN65HVD230 , my step is :(1).sudo modprobe can,sudo modprobe can_raw,sudo modprobe mttcan.(2).sudo ip link set can0 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on; sudo ip link set can1 type can bitrate 500000 dbitrate 2000000 berr-reporting on fd on;(3)sudo ip link set up can0, sudo ip link set up can1. (4)i am sure i have installed can-utils,(5)one terminal:candump can1, another terminal: cansend can0 123#abcdabcd. but dit not receive anything in can1 terminal. and i use “ip -details -statistics link show can0” before “cansend can0 123#abcdabcd” cammand, can state is “ERROR-ACTIVE”, when i send , can state is “BUS-OFF”,i have no idea,can you help me ? thanks!.Hi zsjalive,
Can you check register settings:
Register: 0x0c303020 Value: 0x458
Register: 0x0c303018 Value: 0x400
Register: 0x0c303010 Value: 0x458
Register: 0x0c303008 Value: 0x400
you can use devmem to read the registers.
Also make sure that no wires are loose.
Also can you please provide kernel dmesg logs when you ran all above commands mentioned by you.
hi,I have read and checked register settings,the result is in the uploaded pic. I think the value of mentioned registers is correct. and i have checked wires, i am sure it wires ok,i have uploaded dmesg log.20210104dmesg.txt (74.5 KB) ,and i saw some error in dmesg.
Hi,
which Jetpack version you are using?
also, can you read below command and provide output here:
cat /sys/kernel/debug/bpmp/debug/clk/can1/pto_counter
jetpack4.4(release 32.4.3).
,something else you want to know?do you have some suggestions?is 120-ohm resistor between CAN_H and CAN_L necessary?
Hi ,
Can you try loopback is working fine?
ip link set can0 up type can bitrate 500000 loopback on
candump can0 &
cansend can0 123#abcdabcd
you do not need any connections for this. This is internal controller loopback testing.
there should be 120ohm termination already in the transceiver. so you do not need it explicitly
ok, am checking it internally.
I will update you soon.
Once last thing, how frequently are you seeing the issue. After every system boot?
Thanks,
Shubhi
thanks for you internal checking, i have another question,i test loopbakc mode, i use “cansend can0 123#abcdabcd” to send one message,but on candump can0 terminal, it receive two same message. can you tell me the mechanism?
one is for Tx since sending from can0 and another for Rx, receiving at can0 therefore 2 messages.
you can use candump -x can0 command for clarity.
thanks very much, i am waiting for your internal checking.
hi ,is there some advise for my test using SN65HVD230?
hi,my two bought SN65HVD230 transceiver, i am sure there is 120ohm resistor between CANH and CANL for each transceiver, BTW, you said there is 120ohm resistor already in the transceiver, so i doublt if there is 120ohm resistor already in the transceiver or not. can you check it. some days before,i have connected CAN TX and CAN RX on J26 for test, i am not sure this will corrupt hardware or something else or not? another question: what is the digital level of CAN TX and CAN RX on J26 when TX2 power up. i measured TX is about 3.3V.
hi ,i am sorry to tell you , the issue is poor quality of my bought can transceiver. i changed a pair of can transceiver, it runs ok.
Hi,
Most of the times, transceiver is the culprit.
Good to hear that issue is resolved.
Thanks,
Shubhi