TS-7400 V2 CAN: Difference between revisions

From embeddedTS Manuals
(Created page with "The TS-7400 i.MX286 CPU has two FlexCAN ports that use the linux SocketCAN implementation. Please note that the TS-7400_V2 does not have CAN transceivers, these will need to ...")
 
No edit summary
Line 1: Line 1:
The TS-7400 i.MX286 CPU has two FlexCAN ports that use the linux SocketCAN implementation.  Please note that the TS-7400_V2 does not have CAN transceivers, these will need to be supplied externally and connected to the CAN pins on the expansion header.  The ports can be set up and used with the following commands:
The TS-7400_V2 i.MX286 CPU has two FlexCAN ports that use the linux SocketCAN implementation.  Please note that the TS-7400_V2 does not have CAN transceivers, these will need to be supplied externally and connected to the CAN pins on the expansion header.  The ports can be set up and used with the following commands:
<source lang="bash">
<source lang="bash">
devmem 0x80018110 32 0x3ff5f5f
devmem 0x80018110 32 0x3ff5f5f
#Note that this is only necessary on the October 2, 2013 TS-7670 image.
#Note that this is only necessary on the October 2, 2013 TS-7670/TS7400_V2 image.
modprobe flexcan
modprobe flexcan
ifconfig can0 up
ifconfig can0 up

Revision as of 19:09, 19 December 2013

The TS-7400_V2 i.MX286 CPU has two FlexCAN ports that use the linux SocketCAN implementation. Please note that the TS-7400_V2 does not have CAN transceivers, these will need to be supplied externally and connected to the CAN pins on the expansion header. The ports can be set up and used with the following commands:

devmem 0x80018110 32 0x3ff5f5f
#Note that this is only necessary on the October 2, 2013 TS-7670/TS7400_V2 image.
modprobe flexcan
ifconfig can0 up
ifconfig can1 up


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.