开发个产品,要用到CAN 5000的波特率,使用IP指令设置后,用ifconfig can0 up 加载不了,提示超时,具体CAN细节如下:
/sys/devices/platform/soc/2000000.aips-bus/2090000.can/net/can0 # ip -details li
n show can0
2: can0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
bitrate 5000 sample-point 0.708
tq 8333 prop-seg 8 phase-seg1 8 phase-seg2 7 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
clock 30000000
/sys/devices/platform/soc/2000000.aips-bus/2090000.can/net/can0 # ip link set ca
n0 type can bitrate 5000
/sys/devices/platform/soc/2000000.aips-bus/2090000.can/net/can0 #
/sys/devices/platform/soc/2000000.aips-bus/2090000.can/net/can0 # ifconfig can0
up
flexcan 2090000.can can0: writing ctrl=0xf93e2057
ifconfig: SIOCSIFFLAGS: Connection timed out
看网上说设置CAN clks[IMX6UL_CLK_CAN_PODF] = imx_clk_divider("can_podf", "can_sel", base + 0x20, 2, 6); 时钟,没看明白怎么设置24M