VAR-SOM-AM43 Can-bus: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{PageHeader|VAR-SOM-AM43 - CAN Bus}} {{DocImage|category1=VAR-SOM-AM43|category2=Yocto}} __toc__
{{PageHeader|VAR-SOM-AM43 - CAN Bus}} {{DocImage|category1=VAR-SOM-AM43|category2=Yocto}} __toc__
The AM43 DVK exports two CAN Bus interfaces can0 & can1
The AM43 DVK exports two CAN Bus interfaces can0 & can1</br>
For testing CAN Bus:
For testing CAN Bus:
*Short CANL, CANH and GND pins of the 2 CAN Bus interfaces CAN0, CAN1 (located on J11).
*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:
*Type the following into the shell for configuring both CAN bus interfaces:
<pre>$ ip link set can0 type can bitrate 50000 triple-sampling on
<pre>$ ip link set can0 type can bitrate 50000 triple-sampling on

Revision as of 14:51, 24 December 2015

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