TS-7680 CAN

From embeddedTS Manuals
Revision as of 13:31, 20 November 2015 by Kris (talk | contribs) (Created page with "The i.MX28 CPU has two FlexCAN ports that use the linux SocketCAN implementation. The ports can be set up and used with the following commands: <source lang="bash"> ip link s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The i.MX28 CPU has two FlexCAN ports that use the linux SocketCAN implementation. The ports can be set up and used with the following commands:

ip link set can0 up type can bitrate 1000000
ip link set can1 up type can bitrate 1000000


At this point the ports can be used with standard SocketCAN libraries. In debian we provide cansend and candump to test the ports or as a simple packet send/recv tool. In order to test the two ports together, tie CAN_H of both CAN ports together, and do the same for CAN_L. Then use the following commands:

candump can0 &
cansend can1 123#DEADBEEF
#This command will return
  can0  123  [4] DE AD BE EF



See the SocketCAN webpage for more information on utilizing SocketCAN.