VAR-SOM-AM43 Can-bus

From Variscite Wiki
Revision as of 14:51, 24 December 2015 by Aviad (talk | contribs)
VAR-SOM-AM43 - CAN Bus

The AM43 DVK exports two CAN Bus interfaces can0 & can1
For testing CAN Bus:

  • Short CANL, CANH and GND pins of the 2 CAN Bus interfaces can0, can1 (located on J11).
  • Type the following into the shell for configuring both CAN bus interfaces:
$ ip link set can0 type can bitrate 50000 triple-sampling on
$ ip link set can0 up
$ ip link set can1 type can bitrate 50000 triple-sampling on
$ ip link set can1 up
  • Type the following to the shell for testing receiving over can0 interface):
$ candump can0 &
  • Type the following to the shell for testing sending data packets over can1 interface):
$ cansend can1 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
  • At this point, can0 interface will receive the data packet sent from can1 interface:
<0x001> [8] 11 22 33 44 55 66 77 88