can总线调试示波器能够检测到有方波输出,但是canecho总是接收不到数据
/*CAN_PWROFF*/
MX6Q_PAD_SD1_CMD__GPIO_1_18,
/* CAN1 */
MX6Q_PAD_KEY_ROW2__CAN1_RXCAN,
MX6Q_PAD_KEY_COL2__CAN1_TXCAN,
/*CAN2*/
MX6Q_PAD_KEY_ROW4__CAN2_RXCAN,
MX6Q_PAD_KEY_COL4__CAN2_TXCAN,
static void mx6q_sabresd_flexcan0_switch(int enable)
{
}
static void mx6q_sabresd_flexcan1_switch(int enable)
{
}
static const struct flexcan_platform_data
mx6q_sabresd_flexcan0_pdata __initconst = {
.transceiver_switch = mx6q_sabresd_flexcan0_switch,
};
static const struct flexcan_platform_data
mx6q_sabresd_flexcan1_pdata __initconst = {
.transceiver_switch = mx6q_sabresd_flexcan1_switch,
};
static int imx6_init_flexcan()
{
gpio_request(MX6Q_PAD_SD1_CMD__GPIO_1_18, "can_pwroff");
gpio_direction_output(MX6Q_PAD_SD1_CMD__GPIO_1_18, 1);
msleep(1);
gpio_set_value(MX6Q_PAD_SD1_CMD__GPIO_1_18, 1);
return 0;
}
imx6q_add_flexcan0(&mx6q_sabresd_flexcan0_pdata);
imx6q_add_flexcan1(&mx6q_sabresd_flexcan1_pdata);
测试数据
canconfig can0 bitrate 125000
ifconfig can0 up
cansend can0 -i0x100 11 22 33 44
root@freescale /$ canecho can0 -v
interface-in = can0, interface-out = can0, family = 29, type = 3, proto = 1
然后就没有数据了,示波器显示腿脚有波形但是canecho没有输出数据
|