AnsweredAssumed Answered

Send and receive CAN frames on i.MX6 Sabre Lite Board?

Question asked by jcpep on Jun 12, 2013
Latest reply on Jun 27, 2013 by oezguer
Branched to a new discussion



I am using a Freescale iMX6 Sabre Lite, for which I tried to compile an image with the LTIB. Since I couldn't install it, I tried using this image on my board.

I seem to be able to configure my can0 interface with the command:

root@freescale ~$ ip link set can0 up type can bitrate 500000
root@freescale ~$ ip -details -statistics link show can0
2: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
    can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
    bitrate 500000 sample-point 0.866
    tq 133 prop-seg 6 phase-seg1 6 phase-seg2 2 sjw 1
    flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
    clock 30000000
    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  
    0          0        0       0       0       0     
    TX: bytes  packets  errors  dropped carrier collsns
    0          0        0       0       0       0   


But then, when I tried to send frames to another computer which is using this USB/CAN adapter, the frames are not received. I tried with both this kind of C program, and this command:

root@freescale ~$ while true; do cantest can0 123#12345678


So now I am wondering if this is proper way to configure my can0 interface and send frames on it. Since I am really new to both embedded devices and CAN communication, I have absolutely no clue of what could or should be done. If this method isn't the appropriate one, what would be the proper way to work with CAN?


Any help would be greatly appreciated.