Part Number: AM3352
Hi Expert,
customer is using 600MHz AM3352, when they increase the baud rate, there is packet loss, there is the support need.
could you or other TI experts make some improvements to the CAN bus driver?
For example, DMA support for CAN in Linux.
Below is the issue detail.
Initial observations indicate that this issue is particularly pronounced when both CAN ports are operating simultaneously, and the frequency and severity of packet loss significantly increase with higher CAN baud rates.
Dual CAN Operation Impact: The packet loss phenomenon significantly worsens when both AM3352 CAN interfaces (CAN0 and CAN1) are simultaneously receiving data.
Baud Rate Impact: Preliminary tests show that higher CAN communication baud rates lead to increased frequency and severity of packet loss. For instance, at 500Kbps baud rate, the packet loss rate is significantly higher than at 250Kbps. This packet loss can result in unstable system communication, affecting data integrity and real-time performance, posing a potential risk to reliable device operation.
Here below is the snapshot from TI AM335X Technical Reference Manual, the CAN controller can support up to 1Mbit/s baud rate.
1. Reproduction Environment: Two DRACO (AM3352) connected via dual CAN bus. DRACO2 sends CAN Frame continuously and DRACO1 receives these frames.
2. Reproduction Steps:
Here below provide the reproduction step with candump and cangen, which are provided by official can-utils.
- On DRACO2:
root@fs360d-xc720:~# ip link set can0 type can bitrate 500000
root@fs360d-xc720:~# ip link set can1 type can bitrate 500000
root@fs360d-xc720:~# ip link set up can0
root@fs360d-xc720:~# ip link set up can1
root@fs360d-xc720:/data# while true
> do
> cangen can0 -g 1 -L 8 -D r -I r -c 5
> done
root@fs360d-xc720:~# while true
> do
> cangen can1 -g 1 -L 8 -D r -I r -c 5
> done
- On DRACO1
root@fs360d-xc720:~# ip link set can0 type can bitrate 500000
root@fs360d-xc720:~# ip link set can1 type can bitrate 500000
root@fs360d-xc720:~# ip link set up can0
root@fs360d-xc720:~# ip link set up can1
root@fs360d-xc720:~# candump can0,0~0,#FFFFFFFF
can0 20000004 [8] 00 01 00 00 00 00 00 00 ERRORFRAME
can0 20000004 [8] 00 01 00 00 00 00 00 00 ERRORFRAME
can0 20000004 [8] 00 01 00 00 00 00 00 00 ERRORFRAME
BR,
Biao