CAN on DIMM-AM335 under Linux

DCAN

The DIMM-AM335x features two CAN interfaces d_can0 and d_can1. Both are accessible on the baseboard Verno.

d_can0 is connected to the D-SUB connector J15. d_can1 is connected to the pin header J20.

Each interface can be enabled separately by the kernel parameter d_can in U-Boot. The commands on U-Boot are the following.

setenv d_can 'value'saveenv

What value to set for the appropriate interface shows the table below.

 

d_cand_can0d_can1Remarks
0-- 
1x-default
2-x 
3xx 

 

 

The driver interface complies with the SocketCAN interface. There is general documentation for SocketCAN available in the Linux kernel tree at https://www.kernel.org/doc/Documentation/networking/can.txt.

For basic testing you can use the canutils:

For example: d_can0

# Configuration(if you reconfig the bitrate, you have to stop the interface before)

canconfig can0 bitrate 100000 ctrlmode triple-sampling on

# Starting

canconfig can0 start

# Sending 8 data bytes ten times

cansend can0 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88 --loop=10

# Receiving on a configured and started can1

candump can1

# Stoping

canconfig can0 stop



Back