HI
I am debugging can bus on sabresd platform.But CAN bus cann't work normally on sabresd platform.
I cann't probe the waveform from the CAN0_TX.
Firstly i add the pin in board_mx6q_sabresd.h:
MX6Q_PAD_GPIO_7__CAN1_TXCAN,
MX6Q_PAD_GPIO_8__CAN1_RXCAN,
Secondly ,I follow the steps below
dmesg | grep can
ip link set can0 up type can bitrate 125000
ifconfig can0 up
ifconfig can0
cansend can0 -i0x100 11 22 33 44
But i cann't still probe the waveform from the CAN0_TX
The picture is as follows
one
My kernel is linux 3.0.35. Attachment is my reference document
Can you anyone help me ?
HI:
igorpadykov:
Do I need to connect CAN1_TX and CAN1_RX?
Now ,i didn't connect CAN1_TX and CAN1_RX.But i get the data.
My test command is as follws:
root@freescale /$ ip link set can0 down
root@freescale /$ ip link set can0 type can bitrate 50000 loopback on
root@freescale /$ ip link set can0 up
flexcan imx6q-flexcan.0: writing ctrl=0x27293005
root@freescale /$ candump can0 &
[1] 2570
interface = can0, family = 29, type = 3, proto = 1
root@freescale /$ cansend can0 -i 0x01 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
interface = can0, family = 29, type = 3, proto = 1
<0x001> [8] 11 22 33 44 55 66 77 88
root@freescale /$
root@freescale /$ cantest can0 1F334455#1122334455667788
root@freescale /$ <0x1f334455> [8] 11 22 33 44 55 66 77 88
This is correct?
> Now ,i didn't connect CAN1_TX and CAN1_RX.But i get the data.
CAN1_RX should be connected to CAN1_TX in loopback mode
or other board, otherwise CAN1_RX may be treated by driver as always busy
state and will not send data.
HI:
igorpadykov
I have already connected CAN1_TX and CAN1_RX.
I test as follows:
s
Is this correct?
I havn't still probed any waveform on CAN1_TX or CAN1_RX
HI:
igorpadykov:
yes
Hi tang
for testing two boards should be used. Alternatively one can test
with imx-test package (..test/can folder)
www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.4.tar.gz
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
HI:
My main problem is that i cann't probe any wareform from the CAN1_TX
had you tried loopback test