Hi,
SDK7.0
linux 4.1.6
If there is only AM335x under CAN bus, AM335x only sends one data and the bus does not stop but keeps sending this data repeatedly.
Is it possible to set the number of automatic retransmissions or the length of time?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
SDK7.0
linux 4.1.6
If there is only AM335x under CAN bus, AM335x only sends one data and the bus does not stop but keeps sending this data repeatedly.
Is it possible to set the number of automatic retransmissions or the length of time?
Hi,
Paul's answer is correct, there is not a method to re-transmit the same message automatically.
Best Regards,
Schuyler
Hi,
The current situation that the customer encounters is that the same data has been repeatedly sent, and he expects to set the number of automatic retransmissions or the length of time. The TRM 23.3.15.3 referred that how to disable automatic retransmission, Does it mean that there is no way to meet customer's requirements?
Hi,
Is this a situation where there are bus errors happening? Are these repeating frames re-transmits?
Best Regards,
Schuyler
Yes, the same data is repeating re-transmits actually. Customer don't want to disable that function totally.
For example, if the transmission fails within 5 seconds, it will be retransmitted automatically, and the transmission will be turned off after 5 seconds. Or judge the times of retransmissions.
Hi,
Could the customer please return the results of this command:
ip -d link show can0
Is this their application or are they using a canutils command such as cansend or cangen?
Best Regards,
Schuyler
# ip -d link show can0
2: can0@NONE: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mod e DEFAULT qlen 10
link/can
can <TRIPLE-SAMPLING> state ERROR-PASSIVE (berr-counter tx 128 rx 0) restart -ms 0
bitrate 50000 sample-point 0.875
tq 1250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
clock 24000000
He uses cansend command.
Hi,
The bus is in an error state (ERROR-PASSIVE) please ask the customer for the ip command again with an added flag and the other two commands. Is the cabling terminated correctly?
ip -d -s link show can0
cat /proc/net/can/stats
ifconfig -a can0
Is candump being used on the receiving end of the link? What does ip -d -s link show can0 show on the receiving end? I have assumed that the CAN device on the receiver is can0.
Please ask the customer to list the commands they are using to initialize the interface.
How is the customer using the cansend command?
Also please note that this is a very old SDK.
Best Regards,
Schuyler
Not connected to any other device,there is only AM335x under CAN bus.
We referenced design by this link :software-dl.ti.com/.../DCAN.html
# ip -d -s link show can0
2: can0@NONE: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT qlen 10
link/can
can <TRIPLE-SAMPLING> state ERROR-ACTIVE (berr-counter tx 135 rx 0) restart-ms 0
bitrate 50000 sample-point 0.875
tq 1250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
clock 24000000
re-started bus-errors arbit-lost error-warn error-pass bus-off
0 0 0 1 1 0
RX: bytes packets errors dropped overrun mcast
16 2 0 0 0 0
TX: bytes packets errors dropped carrier collsns
8 1 0 0 0 0
# cat /proc/net/can/stats
3 transmitted frames (TXF)
6 received frames (RXF)
2 matched frames (RXMF)
33 % total match ratio (RXMR)
0 frames/s total tx rate (TXR)
0 frames/s total rx rate (RXR)
100 % current match ratio (CRXMR)
0 frames/s current tx rate (CTXR)
0 frames/s current rx rate (CRXR)
100 % max match ratio (MRXMR)
2 frames/s max tx rate (MTXR)
4 frames/s max rx rate (MRXR)
1 current receive list entries (CRCV)
2 maximum receive list entries (MRCV)
# ifconfig -a can0
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:16 (16.0 B) TX bytes:8 (8.0 B)
Interrupt:166
Hi,
Since you mention there are no other nodes on the network Are you connecting CAN0 back on itself or not connecting to anything at all?
There needs to be another device connected. This might explain the continuous send since an ACK is required to let the sender know the message was received correctly or incorrectly.
Best Regards,
Schuyler
Is not connecting to anything at all. not connecting to anything at all or other equipment is not online,we hope that don't always repeat sent,such as only repeat sent 10 seconds.Or repeat send only limited the number of times.
Hi,
I think this is the problem. The interface will keep sending until there is an acknowledge. Since the device is connected to another device the acknowledge is never happening. I would recommend connecting another CAN device so an message acknowledge happens.
Best Regards,
Schuyler