使用此链接进行调试时CAN接口使用指导 - Atlas 500 A2 智能小站 用户指南 07 - 华为
ip link set can2 up type can bitrate 500000,使用上述唤醒方式进行激活CAN2接口,并且只在一个板子上进行收发测试,未进行任何外部连线,使用发送指令后直接收至接收端,意味着未进行任何连线TX与RX未接任何线,但是使用发送指令后理应无任何接受反馈,本地环回 (Local Loopback)能够收到信息如下图所示;使用的SIT65HVD230的CAN芯片


接下来进行外部接入USB转CAN转换器或使用两个板子对接收发测试仍然无法正常收发数据,并且TX dropped数值不断增加,不确定是什么原因导致的;
-sh-5.1# ifconfig
can2: flags=129<UP,NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
RX packets 1492 bytes 9622 (9.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1013 bytes 5790 (5.6 KiB)
TX errors 0 dropped 119 overruns 0 carrier 119 collisions 0
设备树编辑如下所示:




使用Atlas 200I A2 加速模块查询引脚复用以及关系如下所示:
-sh-5.1# cd /sys/kernel/debug/pinctrl/82320000.pinmux-pinctrl-single/
-sh-5.1# ll
total 0
-r--r--r-- 1 root root 0 Jan 1 00:00 gpio-ranges
-r--r--r-- 1 root root 0 Jan 1 00:00 pingroups
-r--r--r-- 1 root root 0 Jan 1 00:00 pinmux-functions
-r--r--r-- 1 root root 0 Jan 1 00:00 pinmux-pins
-r--r--r-- 1 root root 0 Jan 1 00:00 pins
-sh-5.1# vi pinmux-functions
function: uart1_tx_pmx_func, groups = [ uart1_tx_pmx_func ]
function: uart1_rx_pmx_func, groups = [ uart1_rx_pmx_func ]
function: uart1_tx_pmx_idle, groups = [ uart1_tx_pmx_idle ]
function: uart1_rx_pmx_idle, groups = [ uart1_rx_pmx_idle ]
function: uart3_tx_pmx_func, groups = [ uart3_tx_pmx_func ]
function: uart3_rx_pmx_func, groups = [ uart3_rx_pmx_func ]
function: uart3_tx_pmx_idle, groups = [ uart3_tx_pmx_idle ]
function: uart3_rx_pmx_idle, groups = [ uart3_rx_pmx_idle ]
function: uart6_tx_pmx_func, groups = [ uart6_tx_pmx_func ]
function: uart6_rx_pmx_func, groups = [ uart6_rx_pmx_func ]
function: gps_int_pmx_func, groups = [ gps_int_pmx_func ]
function: uart6_tx_pmx_idle, groups = [ uart6_tx_pmx_idle ]
function: uart6_rx_pmx_idle, groups = [ uart6_rx_pmx_idle ]
function: gps_int_pmx_idle, groups = [ gps_int_pmx_idle ]
function: can2_rx_pmx_func, groups = [ can2_rx_pmx_func ]
function: can2_tx_pmx_func, groups = [ can2_tx_pmx_func ]
function: can2_rx_pmx_idle, groups = [ can2_rx_pmx_idle ]
function: can2_tx_pmx_idle, groups = [ can2_tx_pmx_idle ]
function: can3_rx_pmx_func, groups = [ can3_rx_pmx_func ]
function: can3_tx_pmx_func, groups = [ can3_tx_pmx_func ]
function: can3_rx_pmx_idle, groups = [ can3_rx_pmx_idle ]
function: can3_tx_pmx_idle, groups = [ can3_tx_pmx_idle ]
~
-sh-5.1# vi pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
pin 0 (PIN0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 1 (PIN1): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 2 (PIN2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 3 (PIN3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 4 (PIN4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 5 (PIN5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 6 (PIN6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 7 (PIN7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 8 (PIN8): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 9 (PIN9): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 10 (PIN10): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 11 (PIN11): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 12 (PIN12): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 13 (PIN13): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 14 (PIN14): 82220000.uart (GPIO UNCLAIMED) function uart1_tx_pmx_func group uart1_tx_pmx_func
pin 15 (PIN15): 82220000.uart (GPIO UNCLAIMED) function uart1_rx_pmx_func group uart1_rx_pmx_func
pin 16 (PIN16): 822d0000.mttcan (GPIO UNCLAIMED) function can3_tx_pmx_func group can3_tx_pmx_func
@@@
-sh-5.1# vi pingroups
registered pin groups:
group: uart1_tx_pmx_func
pin 14 (PIN14)
group: uart1_rx_pmx_func
pin 15 (PIN15)
group: uart1_tx_pmx_idle
pin 14 (PIN14)
group: uart1_rx_pmx_idle
pin 15 (PIN15)
group: uart3_tx_pmx_func
pin 20 (PIN20)
group: uart3_rx_pmx_func
pin 21 (PIN21)
group: uart3_tx_pmx_idle
pin 20 (PIN20)
group: uart3_rx_pmx_idle
-sh-5.1# vi pins
registered pins: 39
pin 0 (PIN0) 0:? 82320000 00000000 pinctrl-single
pin 1 (PIN1) 0:? 82320004 00000000 pinctrl-single
pin 2 (PIN2) 0:? 82320008 00000000 pinctrl-single
pin 3 (PIN3) 0:? 8232000c 00000000 pinctrl-single
pin 4 (PIN4) 0:? 82320010 00000000 pinctrl-single
pin 5 (PIN5) 0:? 82320014 00000000 pinctrl-single
pin 6 (PIN6) 0:? 82320018 00000000 pinctrl-single
pin 7 (PIN7) 0:? 8232001c 00000000 pinctrl-single
pin 8 (PIN8) 0:? 82320020 00000000 pinctrl-single
pin 9 (PIN9) 0:? 82320024 00000000 pinctrl-single
pin 10 (PIN10) 0:? 82320028 00000000 pinctrl-single
pin 11 (PIN11) 0:? 8232002c 00000000 pinctrl-single
pin 12 (PIN12) 0:? 82320030 00000000 pinctrl-single
pin 13 (PIN13) 0:? 82320034 00000000 pinctrl-single
pin 14 (PIN14) 0:? 82320038 00000000 pinctrl-single
pin 15 (PIN15) 0:? 8232003c 00000000 pinctrl-single
pin 16 (PIN16) 0:? 82320040 00000001 pinctrl-single
pin 17 (PIN17) 0:? 82320044 00000001 pinctrl-single
pin 18 (PIN18) 0:? 82320048 00000001 pinctrl-single
pin 19 (PIN19) 0:? 8232004c 00000001 pinctrl-single
pin 20 (PIN20) 0:? 82320050 00000000 pinctrl-single
pin 21 (PIN21) 0:? 82320054 00000000 pinctrl-single
使用此链接进行调试时CAN接口使用指导 - Atlas 500 A2 智能小站 用户指南 07 - 华为
ip link set can2 up type can bitrate 500000,使用上述唤醒方式进行激活CAN2接口,并且只在一个板子上进行收发测试,未进行任何外部连线,使用发送指令后直接收至接收端,意味着未进行任何连线TX与RX未接任何线,但是使用发送指令后理应无任何接受反馈,本地环回 (Local Loopback)能够收到信息如下图所示;使用的SIT65HVD230的CAN芯片
接下来进行外部接入USB转CAN转换器或使用两个板子对接收发测试仍然无法正常收发数据,并且TX dropped数值不断增加,不确定是什么原因导致的;
-sh-5.1# ifconfig
can2: flags=129<UP,NOARP> mtu 16
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 10 (UNSPEC)
RX packets 1492 bytes 9622 (9.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1013 bytes 5790 (5.6 KiB)
TX errors 0 dropped 119 overruns 0 carrier 119 collisions 0
设备树编辑如下所示:
使用Atlas 200I A2 加速模块查询引脚复用以及关系如下所示:
-sh-5.1# cd /sys/kernel/debug/pinctrl/82320000.pinmux-pinctrl-single/
-sh-5.1# ll
total 0
-r--r--r-- 1 root root 0 Jan 1 00:00 gpio-ranges
-r--r--r-- 1 root root 0 Jan 1 00:00 pingroups
-r--r--r-- 1 root root 0 Jan 1 00:00 pinmux-functions
-r--r--r-- 1 root root 0 Jan 1 00:00 pinmux-pins
-r--r--r-- 1 root root 0 Jan 1 00:00 pins
-sh-5.1# vi pinmux-functions
function: uart1_tx_pmx_func, groups = [ uart1_tx_pmx_func ]
function: uart1_rx_pmx_func, groups = [ uart1_rx_pmx_func ]
function: uart1_tx_pmx_idle, groups = [ uart1_tx_pmx_idle ]
function: uart1_rx_pmx_idle, groups = [ uart1_rx_pmx_idle ]
function: uart3_tx_pmx_func, groups = [ uart3_tx_pmx_func ]
function: uart3_rx_pmx_func, groups = [ uart3_rx_pmx_func ]
function: uart3_tx_pmx_idle, groups = [ uart3_tx_pmx_idle ]
function: uart3_rx_pmx_idle, groups = [ uart3_rx_pmx_idle ]
function: uart6_tx_pmx_func, groups = [ uart6_tx_pmx_func ]
function: uart6_rx_pmx_func, groups = [ uart6_rx_pmx_func ]
function: gps_int_pmx_func, groups = [ gps_int_pmx_func ]
function: uart6_tx_pmx_idle, groups = [ uart6_tx_pmx_idle ]
function: uart6_rx_pmx_idle, groups = [ uart6_rx_pmx_idle ]
function: gps_int_pmx_idle, groups = [ gps_int_pmx_idle ]
function: can2_rx_pmx_func, groups = [ can2_rx_pmx_func ]
function: can2_tx_pmx_func, groups = [ can2_tx_pmx_func ]
function: can2_rx_pmx_idle, groups = [ can2_rx_pmx_idle ]
function: can2_tx_pmx_idle, groups = [ can2_tx_pmx_idle ]
function: can3_rx_pmx_func, groups = [ can3_rx_pmx_func ]
function: can3_tx_pmx_func, groups = [ can3_tx_pmx_func ]
function: can3_rx_pmx_idle, groups = [ can3_rx_pmx_idle ]
function: can3_tx_pmx_idle, groups = [ can3_tx_pmx_idle ]
~
-sh-5.1# vi pinmux-pins
Pinmux settings per pin
Format: pin (name): mux_owner gpio_owner hog?
pin 0 (PIN0): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 1 (PIN1): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 2 (PIN2): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 3 (PIN3): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 4 (PIN4): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 5 (PIN5): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 6 (PIN6): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 7 (PIN7): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 8 (PIN8): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 9 (PIN9): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 10 (PIN10): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 11 (PIN11): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 12 (PIN12): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 13 (PIN13): (MUX UNCLAIMED) (GPIO UNCLAIMED)
pin 14 (PIN14): 82220000.uart (GPIO UNCLAIMED) function uart1_tx_pmx_func group uart1_tx_pmx_func
pin 15 (PIN15): 82220000.uart (GPIO UNCLAIMED) function uart1_rx_pmx_func group uart1_rx_pmx_func
pin 16 (PIN16): 822d0000.mttcan (GPIO UNCLAIMED) function can3_tx_pmx_func group can3_tx_pmx_func
@@@
-sh-5.1# vi pingroups
registered pin groups:
group: uart1_tx_pmx_func
pin 14 (PIN14)
group: uart1_rx_pmx_func
pin 15 (PIN15)
group: uart1_tx_pmx_idle
pin 14 (PIN14)
group: uart1_rx_pmx_idle
pin 15 (PIN15)
group: uart3_tx_pmx_func
pin 20 (PIN20)
group: uart3_rx_pmx_func
pin 21 (PIN21)
group: uart3_tx_pmx_idle
pin 20 (PIN20)
group: uart3_rx_pmx_idle
-sh-5.1# vi pins
registered pins: 39
pin 0 (PIN0) 0:? 82320000 00000000 pinctrl-single
pin 1 (PIN1) 0:? 82320004 00000000 pinctrl-single
pin 2 (PIN2) 0:? 82320008 00000000 pinctrl-single
pin 3 (PIN3) 0:? 8232000c 00000000 pinctrl-single
pin 4 (PIN4) 0:? 82320010 00000000 pinctrl-single
pin 5 (PIN5) 0:? 82320014 00000000 pinctrl-single
pin 6 (PIN6) 0:? 82320018 00000000 pinctrl-single
pin 7 (PIN7) 0:? 8232001c 00000000 pinctrl-single
pin 8 (PIN8) 0:? 82320020 00000000 pinctrl-single
pin 9 (PIN9) 0:? 82320024 00000000 pinctrl-single
pin 10 (PIN10) 0:? 82320028 00000000 pinctrl-single
pin 11 (PIN11) 0:? 8232002c 00000000 pinctrl-single
pin 12 (PIN12) 0:? 82320030 00000000 pinctrl-single
pin 13 (PIN13) 0:? 82320034 00000000 pinctrl-single
pin 14 (PIN14) 0:? 82320038 00000000 pinctrl-single
pin 15 (PIN15) 0:? 8232003c 00000000 pinctrl-single
pin 16 (PIN16) 0:? 82320040 00000001 pinctrl-single
pin 17 (PIN17) 0:? 82320044 00000001 pinctrl-single
pin 18 (PIN18) 0:? 82320048 00000001 pinctrl-single
pin 19 (PIN19) 0:? 8232004c 00000001 pinctrl-single
pin 20 (PIN20) 0:? 82320050 00000000 pinctrl-single
pin 21 (PIN21) 0:? 82320054 00000000 pinctrl-single