dcan 问题

dcan 问题

此问题尚无答案
All Replies
  • 秀才140分

    can本地回环可以,向外发送的时候没有任何波形输出,下面是dts和启动打印信息,dts的pin配置使用官方的pinmuxtool产生,从bbb的模板上改的,最最主要的是,这一部分的硬件设计的程序 dtb已经在第一版验证过,没有改动,现在重画了板子却不行了:

    /*
    * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
    * Modified by Mirko Denecke <mirkix@gmail.com>
    *
    * This program is free software; you can redistribute it and/or modify
    * it under the terms of the GNU General Public License version 2 as
    * published by the Free Software Foundation.
    */
    /dts-v1/;

    #include "am33xx.dtsi"
    #include "am335x-bone-common.dtsi"

    #include <dt-bindings/board/am335x-bbw-bbb-base.h>
    #include <dt-bindings/pinctrl/am33xx.h>

    / {
    model = "TI AM335x BeagleBone Black";
    compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
    };

    &ldo3_reg {
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
    };

    &mmc1 {
    vmmc-supply = <&vmmcsd_fixed>;
    pinctrl-names = "default";
    pinctrl-0 = <&mymmc1_pins_default>;
    bus-width = <4>;
    status = "okay";
    cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
    };

    &mmc2 {
    vmmc-supply = <&vmmcsd_fixed>;
    pinctrl-names = "default";
    pinctrl-0 = <&mymmc2_pins_default>;
    bus-width = <8>;
    status = "okay";
    };

    &cpu0_opp_table {
    /*
    * All PG 2.0 silicon may not support 1GHz but some of the early
    * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
    * to support 1GHz OPP so enable it for PG 2.0 on this board.
    */
    oppnitro@1000000000 {
    opp-supported-hw = <0x06 0x0100>;
    };
    };

    &am33xx_pinmux {
    mymmc1_pins_default: mymmc1_pins_default {
    pinctrl-single,pins = <
    0x100 ( PIN_INPUT | MUX_MODE0 ) /* (G17) mmc0_clk.mmc0_clk */
    0x104 ( PIN_INPUT | MUX_MODE0 ) /* (G18) mmc0_cmd.mmc0_cmd */
    0xfc ( PIN_INPUT | MUX_MODE0 ) /* (G16) mmc0_dat0.mmc0_dat0 */
    0xf8 ( PIN_INPUT | MUX_MODE0 ) /* (G15) mmc0_dat1.mmc0_dat1 */
    0xf4 ( PIN_INPUT | MUX_MODE0 ) /* (F18) mmc0_dat2.mmc0_dat2 */
    0xf0 ( PIN_INPUT | MUX_MODE0 ) /* (F17) mmc0_dat3.mmc0_dat3 */
    >;
    };


    mymmc2_pins_default: mymmc2_pins_default {
    pinctrl-single,pins = <
    0x80 ( PIN_INPUT | MUX_MODE2 ) /* (U9) gpmc_csn1.mmc1_clk */
    0x84 ( PIN_INPUT | MUX_MODE2 ) /* (V9) gpmc_csn2.mmc1_cmd */
    0x0 ( PIN_INPUT | MUX_MODE1 ) /* (U7) gpmc_ad0.mmc1_dat0 */
    0x4 ( PIN_INPUT | MUX_MODE1 ) /* (V7) gpmc_ad1.mmc1_dat1 */
    0x8 ( PIN_INPUT | MUX_MODE1 ) /* (R8) gpmc_ad2.mmc1_dat2 */
    0xc ( PIN_INPUT | MUX_MODE1 ) /* (T8) gpmc_ad3.mmc1_dat3 */
    0x10 ( PIN_INPUT | MUX_MODE1 ) /* (U8) gpmc_ad4.mmc1_dat4 */
    0x14 ( PIN_INPUT | MUX_MODE1 ) /* (V8) gpmc_ad5.mmc1_dat5 */
    0x18 ( PIN_INPUT | MUX_MODE1 ) /* (R9) gpmc_ad6.mmc1_dat6 */
    0x1c ( PIN_INPUT | MUX_MODE1 ) /* (T9) gpmc_ad7.mmc1_dat7 */
    >;
    };

    mycpsw_default: mycpsw_default {
    pinctrl-single,pins = <
    /* Slave 1 */
    0x108 ( PIN_INPUT | MUX_MODE0 ) /* (H16) gmii1_col.gmii1_col */
    0x10c ( PIN_INPUT | MUX_MODE0 ) /* (H17) gmii1_crs.gmii1_crs */
    0x110 ( PIN_INPUT | MUX_MODE0 ) /* (J15) gmii1_rxer.gmii1_rxer */
    0x114 ( PIN_OUTPUT | MUX_MODE0 ) /* (J16) gmii1_txen.gmii1_txen */
    0x118 ( PIN_INPUT | MUX_MODE0 ) /* (J17) gmii1_rxdv.gmii1_rxdv */
    0x12c ( PIN_INPUT | MUX_MODE0 ) /* (K18) gmii1_txclk.gmii1_txclk */
    0x130 ( PIN_INPUT | MUX_MODE0 ) /* (L18) gmii1_rxclk.gmii1_rxclk */
    0x128 ( PIN_OUTPUT | MUX_MODE0 ) /* (K17) gmii1_txd0.gmii1_txd0 */
    0x124 ( PIN_OUTPUT | MUX_MODE0 ) /* (K16) gmii1_txd1.gmii1_txd1 */
    0x120 ( PIN_OUTPUT | MUX_MODE0 ) /* (K15) gmii1_txd2.gmii1_txd2 */
    0x11c ( PIN_OUTPUT | MUX_MODE0 ) /* (J18) gmii1_txd3.gmii1_txd3 */
    0x140 ( PIN_INPUT | MUX_MODE0 ) /* (M16) gmii1_rxd0.gmii1_rxd0 */
    0x13c ( PIN_INPUT | MUX_MODE0 ) /* (L15) gmii1_rxd1.gmii1_rxd1 */
    0x138 ( PIN_INPUT | MUX_MODE0 ) /* (L16) gmii1_rxd2.gmii1_rxd2 */
    0x134 ( PIN_INPUT | MUX_MODE0 ) /* (L17) gmii1_rxd3.gmii1_rxd3 */

    /* Slave 2 */
    0x78 ( PIN_INPUT | MUX_MODE1 ) /* (U18) gpmc_be1n.gmii2_col */
    0x70 ( PIN_INPUT | MUX_MODE1 ) /* (T17) gpmc_wait0.gmii2_crs */
    0x74 ( PIN_INPUT | MUX_MODE1 ) /* (U17) gpmc_wpn.gmii2_rxer */
    0x40 ( PIN_OUTPUT | MUX_MODE1 ) /* (R13) gpmc_a0.gmii2_txen */
    0x44 ( PIN_INPUT | MUX_MODE1 ) /* (V14) gpmc_a1.gmii2_rxdv */
    0x58 ( PIN_INPUT | MUX_MODE1 ) /* (U15) gpmc_a6.gmii2_txclk */
    0x5c ( PIN_INPUT | MUX_MODE1 ) /* (T15) gpmc_a7.gmii2_rxclk */
    0x54 ( PIN_OUTPUT | MUX_MODE1 ) /* (V15) gpmc_a5.gmii2_txd0 */
    0x50 ( PIN_OUTPUT | MUX_MODE1 ) /* (R14) gpmc_a4.gmii2_txd1 */
    0x4c ( PIN_OUTPUT | MUX_MODE1 ) /* (T14) gpmc_a3.gmii2_txd2 */
    0x48 ( PIN_OUTPUT | MUX_MODE1 ) /* (U14) gpmc_a2.gmii2_txd3 */
    0x6c ( PIN_INPUT | MUX_MODE1 ) /* (V17) gpmc_a11.gmii2_rxd0 */
    0x68 ( PIN_INPUT | MUX_MODE1 ) /* (T16) gpmc_a10.gmii2_rxd1 */
    0x64 ( PIN_INPUT | MUX_MODE1 ) /* (U16) gpmc_a9.gmii2_rxd2 */
    0x60 ( PIN_INPUT | MUX_MODE1 ) /* (V16) gpmc_a8.gmii2_rxd3 */
    >;
    };

    mycpsw_sleep: mycpsw_sleep {
    /* Slave 1 */
    pinctrl-single,pins = <
    0x108 ( PIN_INPUT | MUX_MODE7 ) /* (H16) gmii1_col.gmii1_col */
    0x10c ( PIN_INPUT | MUX_MODE7 ) /* (H17) gmii1_crs.gmii1_crs */
    0x110 ( PIN_INPUT | MUX_MODE7 ) /* (J15) gmii1_rxer.gmii1_rxer */
    0x114 ( PIN_OUTPUT | MUX_MODE7 ) /* (J16) gmii1_txen.gmii1_txen */
    0x118 ( PIN_INPUT | MUX_MODE7 ) /* (J17) gmii1_rxdv.gmii1_rxdv */
    0x12c ( PIN_INPUT | MUX_MODE7 ) /* (K18) gmii1_txclk.gmii1_txclk */
    0x130 ( PIN_INPUT | MUX_MODE7 ) /* (L18) gmii1_rxclk.gmii1_rxclk */
    0x128 ( PIN_OUTPUT | MUX_MODE7 ) /* (K17) gmii1_txd0.gmii1_txd0 */
    0x124 ( PIN_OUTPUT | MUX_MODE7 ) /* (K16) gmii1_txd1.gmii1_txd1 */
    0x120 ( PIN_OUTPUT | MUX_MODE7 ) /* (K15) gmii1_txd2.gmii1_txd2 */
    0x11c ( PIN_OUTPUT | MUX_MODE7 ) /* (J18) gmii1_txd3.gmii1_txd3 */
    0x140 ( PIN_INPUT | MUX_MODE7 ) /* (M16) gmii1_rxd0.gmii1_rxd0 */
    0x13c ( PIN_INPUT | MUX_MODE7 ) /* (L15) gmii1_rxd1.gmii1_rxd1 */
    0x138 ( PIN_INPUT | MUX_MODE7 ) /* (L16) gmii1_rxd2.gmii1_rxd2 */
    0x134 ( PIN_INPUT | MUX_MODE7 ) /* (L17) gmii1_rxd3.gmii1_rxd3 */

    /* Slave 2 */
    0x78 (PIN_INPUT | MUX_MODE7 ) /* (U18) gpmc_be1n.gmii2_col */
    0x70 ( PIN_INPUT | MUX_MODE7 ) /* (T17) gpmc_wait0.gmii2_crs */
    0x74 (PIN_INPUT | MUX_MODE7 ) /* (U17) gpmc_wpn.gmii2_rxer */
    0x40 (PIN_INPUT | MUX_MODE7 ) /* (R13) gpmc_a0.gmii2_txen */
    0x44 (PIN_INPUT | MUX_MODE7 ) /* (V14) gpmc_a1.gmii2_rxdv */
    0x58 ( PIN_INPUT | MUX_MODE7 ) /* (U15) gpmc_a6.gmii2_txclk */
    0x5c ( PIN_INPUT | MUX_MODE7 ) /* (T15) gpmc_a7.gmii2_rxclk */
    0x54 ( PIN_INPUT | MUX_MODE7 ) /* (V15) gpmc_a5.gmii2_txd0 */
    0x50 (PIN_INPUT | MUX_MODE7 ) /* (R14) gpmc_a4.gmii2_txd1 */
    0x4c (PIN_INPUT | MUX_MODE7 ) /* (T14) gpmc_a3.gmii2_txd2 */
    0x48 ( PIN_INPUT | MUX_MODE7 ) /* (U14) gpmc_a2.gmii2_txd3 */
    0x6c ( PIN_INPUT | MUX_MODE7 ) /* (V17) gpmc_a11.gmii2_rxd0 */
    0x68 ( PIN_INPUT | MUX_MODE7 ) /* (T16) gpmc_a10.gmii2_rxd1 */
    0x64 (PIN_INPUT | MUX_MODE7 ) /* (U16) gpmc_a9.gmii2_rxd2 */
    0x60 (PIN_INPUT | MUX_MODE7 ) /* (V16) gpmc_a8.gmii2_rxd3 */
    >;
    };

    myuart1_pins_default: myuart1_pins_default {
    pinctrl-single,pins = <
    0x170 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (E15) uart0_rxd.uart0_rxd */
    0x174 ( PIN_OUTPUT_PULLDOWN | MUX_MODE0 ) /* (E16) uart0_txd.uart0_txd */
    >;
    };

    myuart2_pins_default: myuart2_pins_default {
    pinctrl-single,pins = <
    0x180 ( PIN_INPUT_PULLUP | MUX_MODE0 ) /* (D16) uart1_rxd.uart1_rxd */
    0x184 ( PIN_OUTPUT_PULLDOWN | MUX_MODE0 ) /* (D15) uart1_txd.uart1_txd */
    >;
    };

    myuart3_pins_default: myuart3_pins_default {
    pinctrl-single,pins = <
    0x150 ( PIN_INPUT_PULLUP | MUX_MODE1 ) /* (A17) spi0_sclk.uart2_rxd */
    0x154 ( PIN_OUTPUT_PULLDOWN | MUX_MODE1 ) /* (B17) spi0_d0.uart2_txd */
    >;
    };

    myuart4_pins_default: myuart4_pins_default {
    pinctrl-single,pins = <
    0x160 ( PIN_INPUT_PULLUP | MUX_MODE1 ) /* (C15) spi0_cs1.uart3_rxd */
    0x164 ( PIN_OUTPUT_PULLDOWN | MUX_MODE1 ) /* (C18) eCAP0_in_PWM0_out.uart3_txd */
    /* 0x20 ( PIN_OUTPUT_PULLDOWN | MUX_MODE7 ) (U10) gpmc_ad8.gpio0[22] */

    >;
    };
    myuart5_pins_default: myuart5_pins_default {
    pinctrl-single,pins = <
    0x70 ( PIN_INPUT_PULLUP | MUX_MODE6 ) /* (T17) gpmc_wait0.uart4_rxd */
    0x74 ( PIN_OUTPUT_PULLDOWN | MUX_MODE6 ) /* (U17) gpmc_wpn.uart4_txd */
    /*0x24 ( PIN_OUTPUT_PULLDOWN | MUX_MODE7 ) (T10) gpmc_ad9.gpio0[23] */
    >;
    };


    myuart6_pins_default: myuart6_pins_default {
    pinctrl-single,pins = <
    0xc4 ( PIN_INPUT_PULLUP | MUX_MODE4 ) /* (U2) lcd_data9.uart5_rxd */
    0xc0 ( PIN_OUTPUT_PULLDOWN | MUX_MODE4 ) /* (U1) lcd_data8.uart5_txd */

    >;
    };


    myrtc1_pins_default: myrtc1_pins_default {
    pinctrl-single,pins = <
    0x1f8 ( PIN_INPUT | MUX_MODE0 ) /* (B5) RTC_PORz.RTC_PORz */
    0x200 ( PIN_OUTPUT | MUX_MODE0 ) /* (C5) EXT_WAKEUP.EXT_WAKEUP */
    0x1fc ( PIN_INPUT | MUX_MODE0 ) /* (C6) PMIC_POWER_EN.PMIC_POWER_EN */
    0x204 ( PIN_INPUT | MUX_MODE0 ) /* (B4) ENZ_KALDO_1P8V.ENZ_KALDO_1P8V */
    >;
    };

    mymdio1_pins_default: mymdio1_pins_default {
    pinctrl-single,pins = <
    0x14c ( PIN_OUTPUT | MUX_MODE0 ) /* (M18) mdio_clk.mdio_clk */
    0x148 ( PIN_INPUT | MUX_MODE0 ) /* (M17) mdio_data.mdio_data */
    >;
    };

    mymdio1_pins_sleep: mymdio1_pins_sleep {
    pinctrl-single,pins = <
    /* MDIO reset value */
    0x14c ( PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (M18) mdio_clk.mdio_clk */
    0x148 ( PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (M17) mdio_data.mdio_data */
    >;
    };

    mymdio_pruss11_pins_default: mymdio_pruss11_pins_default {
    pinctrl-single,pins = <
    0x8c ( PIN_OUTPUT | MUX_MODE5 ) /* (V12) gpmc_clk.pr1_mdio_mdclk */
    0x88 ( PIN_INPUT | MUX_MODE5 ) /* (T13) gpmc_csn3.pr1_mdio_data */
    >;
    };

    /* Optional sleep pin settings. Must manually enter values in the below skeleton. */
    mymdio_pruss11_pins_sleep: mymdio_pruss11_pins_sleep {
    pinctrl-single,pins = <
    0x8c ( PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V12) gpmc_clk.pr1_mdio_mdclk */
    0x88 (PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (T13) gpmc_csn3.pr1_mdio_data */
    >;
    };


    myspi1_pins_default: myspi1_pins_default {
    pinctrl-single,pins = <
    0x190 ( PIN_INPUT | MUX_MODE3 ) /* (A13) mcasp0_aclkx.spi1_sclk */
    0x194 ( PIN_INPUT | MUX_MODE3 ) /* (B13) mcasp0_fsx.spi1_d0 */
    0x198 ( PIN_INPUT | MUX_MODE3 ) /* (D12) mcasp0_axr0.spi1_d1 */
    0x19c ( PIN_INPUT | MUX_MODE3 ) /* (C12) mcasp0_ahclkr.spi1_cs0 */
    >;
    };

    myi2c1_pins_default: myi2c1_pins_default {
    pinctrl-single,pins = <
    0x18c ( PIN_INPUT | MUX_MODE0 ) /* (C16) I2C0_SCL.I2C0_SCL */
    0x188 ( PIN_INPUT | MUX_MODE0 ) /* (C17) I2C0_SDA.I2C0_SDA */
    >;
    };


    mydcan1_pins_default: mydcan1_pins_default {
    pinctrl-single,pins = <
    0x17c ( PIN_INPUT | MUX_MODE2 ) /* (D17) uart1_rtsn.dcan0_rx */
    0x178 ( PIN_OUTPUT | MUX_MODE2 ) /* (D18) uart1_ctsn.dcan0_tx */
    >;
    };


    mydcan2_pins_default: mydcan2_pins_default {
    pinctrl-single,pins = <
    0x16c ( PIN_INPUT | MUX_MODE2 ) /* (E17) uart0_rtsn.dcan1_rx */
    0x168 ( PIN_OUTPUT | MUX_MODE2 ) /* (E18) uart0_ctsn.dcan1_tx */
    >;
    };

    mymii1_pins_default: mymii1_pins_default {
    pinctrl-single,pins = <
    0x108 ( PIN_INPUT | MUX_MODE0 ) /* (H16) gmii1_col.gmii1_col */
    0x10c ( PIN_INPUT | MUX_MODE0 ) /* (H17) gmii1_crs.gmii1_crs */
    0x110 ( PIN_INPUT | MUX_MODE0 ) /* (J15) gmii1_rxer.gmii1_rxer */
    0x114 ( PIN_OUTPUT | MUX_MODE0 ) /* (J16) gmii1_txen.gmii1_txen */
    0x118 ( PIN_INPUT | MUX_MODE0 ) /* (J17) gmii1_rxdv.gmii1_rxdv */
    0x12c ( PIN_INPUT | MUX_MODE0 ) /* (K18) gmii1_txclk.gmii1_txclk */
    0x130 ( PIN_INPUT | MUX_MODE0 ) /* (L18) gmii1_rxclk.gmii1_rxclk */
    0x128 ( PIN_OUTPUT | MUX_MODE0 ) /* (K17) gmii1_txd0.gmii1_txd0 */
    0x124 ( PIN_OUTPUT | MUX_MODE0 ) /* (K16) gmii1_txd1.gmii1_txd1 */
    0x120 ( PIN_OUTPUT | MUX_MODE0 ) /* (K15) gmii1_txd2.gmii1_txd2 */
    0x11c ( PIN_OUTPUT | MUX_MODE0 ) /* (J18) gmii1_txd3.gmii1_txd3 */
    0x140 ( PIN_INPUT | MUX_MODE0 ) /* (M16) gmii1_rxd0.gmii1_rxd0 */
    0x13c ( PIN_INPUT | MUX_MODE0 ) /* (L15) gmii1_rxd1.gmii1_rxd1 */
    0x138 ( PIN_INPUT | MUX_MODE0 ) /* (L16) gmii1_rxd2.gmii1_rxd2 */
    0x134 ( PIN_INPUT | MUX_MODE0 ) /* (L17) gmii1_rxd3.gmii1_rxd3 */
    >;
    };

    mymii2_pins_default: mymii2_pins_default {
    pinctrl-single,pins = <
    0x40 ( PIN_OUTPUT | MUX_MODE1 ) /* (R13) gpmc_a0.gmii2_txen */
    0x44 ( PIN_INPUT | MUX_MODE1 ) /* (V14) gpmc_a1.gmii2_rxdv */
    0x58 ( PIN_INPUT | MUX_MODE1 ) /* (U15) gpmc_a6.gmii2_txclk */
    0x5c ( PIN_INPUT | MUX_MODE1 ) /* (T15) gpmc_a7.gmii2_rxclk */
    0x54 ( PIN_OUTPUT | MUX_MODE1 ) /* (V15) gpmc_a5.gmii2_txd0 */
    0x50 ( PIN_OUTPUT | MUX_MODE1 ) /* (R14) gpmc_a4.gmii2_txd1 */
    0x4c ( PIN_OUTPUT | MUX_MODE1 ) /* (T14) gpmc_a3.gmii2_txd2 */
    0x48 ( PIN_OUTPUT | MUX_MODE1 ) /* (U14) gpmc_a2.gmii2_txd3 */
    0x6c ( PIN_INPUT | MUX_MODE1 ) /* (V17) gpmc_a11.gmii2_rxd0 */
    0x68 ( PIN_INPUT | MUX_MODE1 ) /* (T16) gpmc_a10.gmii2_rxd1 */
    0x64 ( PIN_INPUT | MUX_MODE1 ) /* (U16) gpmc_a9.gmii2_rxd2 */
    0x60 ( PIN_INPUT | MUX_MODE1 ) /* (V16) gpmc_a8.gmii2_rxd3 */
    >;
    };

    myusb1_pins_default: myusb1_pins_default {
    pinctrl-single,pins = <
    0x21c ( PIN_OUTPUT | MUX_MODE0 ) /* (F16) USB0_DRVVBUS.USB0_DRVVBUS */
    >;
    };

    myusb2_pins_default: myusb2_pins_default {
    pinctrl-single,pins = <
    0x234 ( PIN_OUTPUT | MUX_MODE0 ) /* (F15) USB1_DRVVBUS.USB1_DRVVBUS */
    >;

    };

    };

    &dcan0 {
    pinctrl-names = "default";
    pinctrl-0 = <&mydcan1_pins_default>;
    status = "okay";
    };


    &tscadc {

    status = "okay";
    adc {
    ti,adc-channels = <0 1 2 3 >;
    ti,chan-step-avg = <0x16 0x16 0x16 0x16>;
    ti,chan-step-opendelay = <0x98 0x98 0x98 0x98 >;
    ti,chan-step-sampledelay = <0x0 0x0 0x0 0x0 >;
    };
    };

    &uart0 {
    pinctrl-names = "default";
    pinctrl-0 = <&myuart1_pins_default>;
    status = "okay";
    };

    &uart1 {
    pinctrl-names = "default";
    pinctrl-0 = <&myuart2_pins_default>;
    status = "okay";
    };

    &uart2 {
    pinctrl-names = "default";
    pinctrl-0 = <&myuart3_pins_default>;
    status = "okay";
    };
    &uart3 {
    pinctrl-names = "default";
    pinctrl-0 = <&myuart4_pins_default>;
    rtx-pin = <22>;/**/
    status = "okay";

    };
    /*
    &uart4 {
    pinctrl-names = "default";
    pinctrl-0 = <&myuart5_pins_default>;
    rtx-pin = <23>;
    status = "okay";

    };
    */
    &uart5 {
    pinctrl-names = "default";
    pinctrl-0 = <&myuart6_pins_default>;
    status = "okay";
    };

    &usb {
    status = "okay";

    control@44e10620 {
    status = "okay";
    };

    usb-phy@47401300 {
    status = "okay";
    };

    usb-phy@47401b00 {
    status = "okay";
    };

    usb@47401000 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&myusb1_pins_default>;
    dr_mode = "host";
    };

    usb@47401800 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&myusb2_pins_default>;
    dr_mode = "host";

    };

    dma-controller@47402000 {
    status = "okay";
    };
    };

    启动打印信息

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 4.9.38 (zhbn@zhbn-virtual-machine) (gcc version 5.3.1 20160113 (Linaro GCC 5.3-2016.02) ) #47~0.02-RDC SMP PREEMPT Thu Nov 9 16:18:29 CST 2017
    [ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [ 0.000000] OF: fdt:Machine model: TI AM335x BeagleBone Black
    [ 0.000000] cma: Reserved 48 MiB at 0x9c800000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM335X ES2.1 (sgx neon)
    [ 0.000000] percpu: Embedded 15 pages/cpu @df92d000 s32000 r8192 d21248 u61440
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129412
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=00000000-02 rw rootfstype=ext4 rootwait
    [ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [ 0.000000] Memory: 447412K/522240K available (12288K kernel code, 1103K rwdata, 4152K rodata, 1024K init, 736K bss, 25676K reserved, 49152K cma-reserved, 0K highmem)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    [ 0.000000] vmalloc : 0xe0000000 - 0xff800000 ( 504 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xdfe00000 ( 510 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc0d00000 (13280 kB)
    [ 0.000000] .init : 0xc1200000 - 0xc1300000 (1024 kB)
    [ 0.000000] .data : 0xc1300000 - 0xc1413cf0 (1104 kB)
    [ 0.000000] .bss : 0xc1415000 - 0xc14cd2a8 ( 737 kB)
    [ 0.000000] Preemptible hierarchical RCU implementation.
    [ 0.000000] Build-time adjustment of leaf fanout to 32.
    [ 0.000000] RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
    [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=1
    [ 0.000000] NR_IRQS:16 nr_irqs:16 16
    [ 0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000016] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [ 0.000039] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [ 0.000053] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.000811] clocksource_probe: no matching clocksources found
    [ 0.001292] Console: colour dummy device 80x30
    [ 0.001321] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [ 0.001330] This ensures that you still see kernel messages. Please
    [ 0.001338] update your kernel commandline.
    [ 0.001364] Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
    [ 0.046697] pid_max: default: 32768 minimum: 301
    [ 0.046998] Security Framework initialized
    [ 0.047015] Yama: becoming mindful.
    [ 0.047058] AppArmor: AppArmor disabled by boot time parameter
    [ 0.047275] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.047289] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [ 0.048490] CPU: Testing write buffer coherency: ok
    [ 0.048566] ftrace: allocating 37784 entries in 111 pages
    [ 0.155054] CPU0: thread -1, cpu 0, socket -1, mpidr 0
    [ 0.155134] Setting up static identity map for 0x80100000 - 0x80100060
    [ 0.202717] Brought up 1 CPUs
    [ 0.202746] SMP: Total of 1 processors activated (995.32 BogoMIPS).
    [ 0.202756] CPU: All CPU(s) started in SVC mode.
    [ 0.204382] devtmpfs: initialized
    [ 0.226967] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [ 0.227527] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
    [ 0.227558] futex hash table entries: 256 (order: 2, 16384 bytes)
    [ 0.231335] xor: measuring software checksum speed
    [ 0.270725] arm4regs : 1217.000 MB/sec
    [ 0.310685] 8regs : 956.000 MB/sec
    [ 0.350683] 32regs : 1088.000 MB/sec
    [ 0.390683] neon : 1664.000 MB/sec
    [ 0.390693] xor: using function: neon (1664.000 MB/sec)
    [ 0.390713] pinctrl core: initialized pinctrl subsystem
    [ 0.392248] NET: Registered protocol family 16
    [ 0.395194] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.422136] omap_hwmod: debugss: _wait_target_disable failed
    [ 0.486731] cpuidle: using governor ladder
    [ 0.498711] cpuidle: using governor menu
    [ 0.507160] OMAP GPIO hardware version 0.1
    [ 0.527004] No ATAGs?
    [ 0.527035] hw-breakpoint: debug architecture 0x4 unsupported.
    [ 0.527321] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [ 0.527336] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [ 0.638859] raid6: int32x1 gen() 264 MB/s
    [ 0.706807] raid6: int32x1 xor() 224 MB/s
    [ 0.774829] raid6: int32x2 gen() 331 MB/s
    [ 0.842688] raid6: int32x2 xor() 261 MB/s
    [ 0.910767] raid6: int32x4 gen() 304 MB/s
    [ 0.978807] raid6: int32x4 xor() 247 MB/s
    [ 1.046848] raid6: int32x8 gen() 300 MB/s
    [ 1.090680] random: fast init done
    [ 1.114815] raid6: int32x8 xor() 201 MB/s
    [ 1.182699] raid6: neonx1 gen() 1455 MB/s
    [ 1.250703] raid6: neonx1 xor() 843 MB/s
    [ 1.318698] raid6: neonx2 gen() 1919 MB/s
    [ 1.386699] raid6: neonx2 xor() 1183 MB/s
    [ 1.454684] raid6: neonx4 gen() 1969 MB/s
    [ 1.522680] raid6: neonx4 xor() 1208 MB/s
    [ 1.590703] raid6: neonx8 gen() 1097 MB/s
    [ 1.658682] raid6: neonx8 xor() 796 MB/s
    [ 1.658692] raid6: using algorithm neonx4 gen() 1969 MB/s
    [ 1.658701] raid6: .... xor() 1208 MB/s, rmw enabled
    [ 1.658710] raid6: using intx1 recovery algorithm
    [ 1.668847] edma 49000000.edma: TI EDMA DMA engine driver
    [ 1.673245] SCSI subsystem initialized
    [ 1.675265] usbcore: registered new interface driver usbfs
    [ 1.675351] usbcore: registered new interface driver hub
    [ 1.675475] usbcore: registered new device driver usb
    [ 1.676086] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [ 1.676211] media: Linux media interface: v0.10
    [ 1.676273] Linux video capture interface: v2.00
    [ 1.676361] pps_core: LinuxPPS API ver. 1 registered
    [ 1.676371] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [ 1.676398] PTP clock support registered
    [ 1.677289] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [ 1.678846] NetLabel: Initializing
    [ 1.678865] NetLabel: domain hash size = 128
    [ 1.678872] NetLabel: protocols = UNLABELED CIPSOv4
    [ 1.678959] NetLabel: unlabeled traffic allowed by default
    [ 1.679556] clocksource: Switched to clocksource timer1
    [ 1.808350] VFS: Disk quotas dquot_6.6.0
    [ 1.808483] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [ 1.823877] NET: Registered protocol family 2
    [ 1.824933] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [ 1.824986] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
    [ 1.825047] TCP: Hash tables configured (established 4096 bind 4096)
    [ 1.825124] UDP hash table entries: 256 (order: 1, 8192 bytes)
    [ 1.825147] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
    [ 1.825368] NET: Registered protocol family 1
    [ 1.834336] RPC: Registered named UNIX socket transport module.
    [ 1.834355] RPC: Registered udp transport module.
    [ 1.834363] RPC: Registered tcp transport module.
    [ 1.834371] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 1.835447] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [ 1.838354] audit: initializing netlink subsys (disabled)
    [ 1.838461] audit: type=2000 audit(1.768:1): initialized
    [ 1.844174] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [ 1.844347] zbud: loaded
    [ 1.849636] NFS: Registering the id_resolver key type
    [ 1.849681] Key type id_resolver registered
    [ 1.849691] Key type id_legacy registered
    [ 1.849711] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
    [ 1.850122] fuse init (API version 7.26)
    [ 1.850575] orangefs_debugfs_init: called with debug mask: :none: :0:
    [ 1.850868] orangefs_init: module version upstream loaded
    [ 1.850879] SGI XFS with ACLs, security attributes, realtime, no debug enabled
    [ 1.870724] Key type asymmetric registered
    [ 1.870750] Asymmetric key parser 'x509' registered
    [ 1.870884] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
    [ 1.875189] io scheduler noop registered
    [ 1.875206] io scheduler deadline registered
    [ 1.875308] io scheduler cfq registered (default)
    [ 1.876687] pinctrl-single 44e10800.pinmux: please update dts to use #pinctrl-cells = <1>
    [ 1.877157] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [ 1.880420] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
    [ 1.881628] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
    [ 1.884871] request pin 92 (PIN92) for 44e09000.serial
    [ 1.884894] request pin 93 (PIN93) for 44e09000.serial
    [ 1.884988] port = dc129bfc,ret = -22,up.port.uartclk = 48000000,rtx_pin_num = -1
    [ 1.885545] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [ 2.752779] console [ttyS0] enabled
    [ 2.756889] request pin 96 (PIN96) for 48022000.serial
    [ 2.762115] request pin 97 (PIN97) for 48022000.serial
    [ 2.767371] port = dc129bfc,ret = -22,up.port.uartclk = 48000000,rtx_pin_num = -1
    [ 2.775412] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [ 2.784824] request pin 84 (PIN84) for 48024000.serial
    [ 2.790090] request pin 85 (PIN85) for 48024000.serial
    [ 2.795371] port = dc129bfc,ret = -22,up.port.uartclk = 48000000,rtx_pin_num = -1
    [ 2.803370] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 160, base_baud = 3000000) is a 8250
    [ 2.812741] request pin 88 (PIN88) for 481a6000.serial
    [ 2.817997] request pin 89 (PIN89) for 481a6000.serial
    [ 2.823276] port = dc129bfc,ret = 0,up.port.uartclk = 48000000,rtx_pin_num = 22
    [ 2.830724] init rtx
    [ 2.833372] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 161, base_baud = 3000000) is a 8250
    [ 2.842740] request pin 49 (PIN49) for 481aa000.serial
    [ 2.847998] request pin 48 (PIN48) for 481aa000.serial
    [ 2.853278] port = dc129bfc,ret = -22,up.port.uartclk = 48000000,rtx_pin_num = -1
    [ 2.861258] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 162, base_baud = 3000000) is a 8250
    [ 2.871857] [drm] Initialized
    [ 2.879916] libphy: Fixed MDIO Bus: probed
    [ 2.885100] tlan: ThunderLAN driver v1.17
    [ 2.889264] tlan: 0 devices installed, PCI: 0 EISA: 0
    [ 2.895930] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
    [ 2.902565] ehci-pci: EHCI PCI platform driver
    [ 2.907120] ehci-platform: EHCI generic platform driver
    [ 2.912589] ehci-omap: OMAP-EHCI Host Controller driver
    [ 2.918705] usbcore: registered new interface driver usb-storage
    [ 2.927178] 47401300.usb-phy supply vcc not found, using dummy regulator
    [ 2.944687] request pin 135 (PIN135) for 47401400.usb
    [ 2.952714] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [ 2.958136] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [ 2.965918] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [ 2.972790] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 2.980080] usb usb1: Product: MUSB HDRC host driver
    [ 2.985092] usb usb1: Manufacturer: Linux 4.9.38 musb-hcd
    [ 2.990539] usb usb1: SerialNumber: musb-hdrc.0
    [ 2.996173] hub 1-0:1.0: USB hub found
    [ 3.000114] hub 1-0:1.0: 1 port detected
    [ 3.016911] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [ 3.036586] request pin 141 (PIN141) for 47401c00.usb
    [ 3.044583] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [ 3.050003] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [ 3.057798] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [ 3.064667] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [ 3.071953] usb usb2: Product: MUSB HDRC host driver
    [ 3.076966] usb usb2: Manufacturer: Linux 4.9.38 musb-hcd
    [ 3.082411] usb usb2: SerialNumber: musb-hdrc.1
    [ 3.088095] hub 2-0:1.0: USB hub found
    [ 3.092020] hub 2-0:1.0: 1 port detected
    [ 3.117716] mousedev: PS/2 mouse device common for all mice
    [ 3.125505] omap_rtc 44e3e000.rtc: already running
    [ 3.130955] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [ 3.138876] i2c /dev entries driver
    [ 3.144214] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 3.152105] cpu cpu0: "ti,syscon-efuse" is missing, cannot use OPPv2 table.
    [ 3.159237] cpuidle: enable-method property 'ti,am3352' found operations
    [ 3.166754] request pin 64 (PIN64) for 48060000.mmc
    [ 3.171719] request pin 65 (PIN65) for 48060000.mmc
    [ 3.176644] request pin 63 (PIN63) for 48060000.mmc
    [ 3.182151] request pin 62 (PIN62) for 48060000.mmc
    [ 3.187182] request pin 61 (PIN61) for 48060000.mmc
    [ 3.192187] request pin 60 (PIN60) for 48060000.mmc
    [ 3.197344] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 3.240186] request pin 32 (PIN32) for 481d8000.mmc
    [ 3.245260] request pin 33 (PIN33) for 481d8000.mmc
    [ 3.251262] request pin 0 (PIN0) for 481d8000.mmc
    [ 3.258045] request pin 1 (PIN1) for 481d8000.mmc
    [ 3.262827] request pin 2 (PIN2) for 481d8000.mmc
    [ 3.267628] request pin 3 (PIN3) for 481d8000.mmc
    [ 3.272439] request pin 4 (PIN4) for 481d8000.mmc
    [ 3.277241] request pin 5 (PIN5) for 481d8000.mmc
    [ 3.282052] request pin 6 (PIN6) for 481d8000.mmc
    [ 3.286830] request pin 7 (PIN7) for 481d8000.mmc
    [ 3.336468] ledtrig-cpu: registered to indicate activity on CPUs
    [ 3.342816] hidraw: raw HID events driver (C) Jiri Kosina
    [ 3.352908] usbcore: registered new interface driver usbhid
    [ 3.358761] usbhid: USB HID core driver
    [ 3.362773] mmc0: host does not support reading read-only switch, assuming write-enable
    [ 3.362902] mmc0: new SD card at address c506
    [ 3.377332] mmcblk0: mmc0:c506 SU01G 943 MiB
    [ 3.382082] remoteproc remoteproc0: wkup_m3 is available
    [ 3.386633] ti_emif_sram 4c000000.emif: Unable to get sram pool for ocmcram data
    [ 3.392736] NET: Registered protocol family 10
    [ 3.401554] mip6: Mobile IPv6
    [ 3.401571] NET: Registered protocol family 17
    [ 3.401650] 8021q: 802.1Q VLAN Support v1.8
    [ 3.401720] Key type dns_resolver registered
    [ 3.401725] mpls_gso: MPLS GSO support
    [ 3.401960] omap_voltage_late_init: Voltage driver support not added
    [ 3.402503] PM: Cannot get wkup_m3_ipc handle
    [ 3.402653] ThumbEE CPU extension supported.
    [ 3.402672] Registering SWP/SWPB emulation handler
    [ 3.404072] registered taskstats version 1
    [ 3.404196] zswap: loaded using pool lzo/zbud
    [ 3.418706] Btrfs loaded, crc32c=crc32c-generic
    [ 3.445270] mmc1: new high speed MMC card at address 0001
    [ 3.446091] Key type encrypted registered
    [ 3.463023] mmcblk1: mmc1:0001 P1XXXX 3.57 GiB
    [ 3.472381] usb 1-1: new high-speed USB device number 2 using musb-hdrc
    [ 3.472533] mmcblk1boot0: mmc1:0001 P1XXXX partition 1 2.00 MiB
    [ 3.483395] mmcblk1boot1: mmc1:0001 P1XXXX partition 2 2.00 MiB
    [ 3.488818] mmcblk1: p1 p2 p3
    [ 3.519884] request pin 98 (PIN98) for 44e0b000.i2c
    [ 3.525054] mmcblk0: p1
    [ 3.528832] request pin 99 (PIN99) for 44e0b000.i2c
    [ 3.572932] input: tps65217_pwr_but as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/tps65217-pwrbutton/input/input0
    [ 3.584327] tps65217 0-0024: TPS65217 ID 0xe version 1.2
    [ 3.589770] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [ 3.596618] PM: Cannot get wkup_m3_ipc handle
    [ 3.601125] remoteproc remoteproc0: powering up wkup_m3
    [ 3.601140] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
    [ 3.601381] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [ 3.601403] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [ 3.629728] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 01:42:12 UTC (946690932)
    [ 3.638725] of_cfs_init
    [ 3.641375] of_cfs_init: OK
    [ 3.666934] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
    [ 3.675246] VFS: Mounted root (ext4 filesystem) on device 179:10.
    [ 3.683084] usb 1-1: New USB device found, idVendor=0bda, idProduct=8176
    [ 3.691115] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 3.698487] usb 1-1: Product: 802.11n WLAN Adapter
    [ 3.703475] usb 1-1: Manufacturer: Realtek
    [ 3.707885] devtmpfs: mounted
    [ 3.709399] Freeing unused kernel memory: 1024K (c1200000 - c1300000)
    [ 3.721322] usb 1-1: SerialNumber: 00e04c000001
    [ 3.729554] PM: am33xx_prepare_push_sram_idle: Unable to get sram pool for ocmcram
    [ 3.925138] systemd[1]: System time before build time, advancing clock.
    [ 4.038817] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN)
    [ 4.057808] systemd[1]: Detected architecture arm.

    接口查询

    root@arm:~# ifconfig -a
    can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
    NOARP MTU:16 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:10
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:167

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536 Metric:1
    RX packets:800 errors:0 dropped:0 overruns:0 frame:0
    TX packets:800 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1
    RX bytes:59200 (59.2 KB) TX bytes:59200 (59.2 KB)

    wlan0 Link encap:Ethernet HWaddr 00:1d:43:b0:6d:cc
    BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    本地回环测试

    root@arm:~# ip link set can0 type can bitrate 250000 loopback on
    root@arm:~# ifconfig can0 up
    root@arm:~# cansend can0 123#12334567
    root@arm:~# ip -d -s link show can0
    2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
    link/can promiscuity 0
    can <LOOPBACK> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
    bitrate 250000 sample-point 0.875
    tq 250 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 0 0 0
    RX: bytes packets errors dropped overrun mcast
    4 1 0 0 0 0
    TX: bytes packets errors dropped carrier collsns
    4 1 0 0 0 0
    root@arm:~#

    向外发送测试,包数没有增加,统计中好像不存在发过这个包

    root@arm:~# ifconfig can0 down
    root@arm:~# ip link set can0 type can bitrate 250000 loopback off
    root@arm:~# ifconfig can0 up
    root@arm:~# cansend can0 123#12345678
    root@arm:~# ip link -d -s show can0
    Command "-d" is unknown, try "ip link help".
    root@arm:~# ip -d -s link show can0
    2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
    link/can promiscuity 0
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
    bitrate 250000 sample-point 0.875
    tq 250 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 0 0 0
    RX: bytes packets errors dropped overrun mcast
    4 1 0 0 0 0
    TX: bytes packets errors dropped carrier collsns
    4

    请前方高能帮忙分析一下

  • 榜眼23920分

    本地的loop back测试是成功的,但是向外面发送数据包失败了?外面接的是什么设备?