CAN on DIMM-MX53 under Linux
The DIMM-MX537 features two CAN interfaces, both are accessible on the baseboards Lothron and Verno.
The driver interface complies to the SocketCAN interface. There is general documentation for SocketCAN available in the Linux kernel tree at ./Documentation/networking/can.txt.
For basic testing you can initialize the can0 interface using:
ifconfig can0 up
The Freescale FlexCAN driver can be configured using sysfs. You can set the bitrate (the device has to be down for this) using the sysfs file /sys/devices/platform/FlexCAN.0/bitrate.
echo 200000 > /sys/devices/platform/FlexCAN.0/bitrate
The commands 'cansend' and 'candump' can be used to send or receive data on a specific can interface. They are contained in canutils package.
# receive can data
# send can data
cansend can0 -i 45 01 02 03 04 05