控制器局域网(CAN)是一种具有内置故障处理功能的分布式通信标准,它主要规范了ISO-11898开放系统互连(OSI)模型的物理层和数据链路层。CAN因其高可靠性的通信机制而被广泛应用于工业、仪器仪表以及汽车行业。CAN网络的关键特性包括:
CANFD与传统CAN有以下不同:
测试指令: ip link set can0 down ip link set can0 up type can bitrate 125000 sample-point 0.87 dbitrate 1000000 dsample-point 0.75 fd on ip link set can0 up cansend can0 123#12345678 # 发送数据 candump can0 # 接收数据 查看测试信息: [root@Tina5 ~]# candump can0 can0 123 [4] 12 34 56 78 can0 123 [4] 12 34 56 78 can0 123 [4] 12 34 56 78 ^C[root@Tina5 ~]# cat /proc/net/can/stats 0 transmitted frames (TXF) 3 received frames (RXF) 3 matched frames (RXMF) 100 % 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) 0 frames/s max tx rate (MTXR) 2 frames/s max rx rate (MRXR) 0 current receive list entries (CRCV) 1 maximum receive list entries (MRCV) [root@Tina5 ~]# cansend can0 123#12345678 [root@Tina5 ~]# cansend can0 123#12345678 [root@Tina5 ~]# cansend can0 123#12345678 [root@Tina5 ~]# cat /proc/net/can/stats 3 transmitted frames (TXF) 6 received frames (RXF) 3 matched frames (RXMF) 50 % total match ratio (RXMR) 0 frames/s total tx rate (TXR) 0 frames/s total rx rate (RXR) 0 % 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) 2 frames/s max rx rate (MRXR) 0 current receive list entries (CRCV) 1 maximum receive list entries (MRCV) |
|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )
GMT+8, 2024-11-24 19:20
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.