How to configure and use CAN bus

From RidgeRun Developer Connection

(Difference between revisions)
Jump to:navigation, search
Line 1: Line 1:
-
This article explains how to enable the CAN bus using as example the [[:Category:AM35x AM35x]] [[LogicPD AM35x EVM | EVM]], but can be applied to other platforms as well.
+
This article explains how to enable the CAN bus using as example the [[:Category:AM35x | AM35x]] [[LogicPD AM35x EVM | EVM]], but can be applied to other platforms as well.
== Build the SDK with socketcan and ip tools ==
== Build the SDK with socketcan and ip tools ==
Line 21: Line 21:
* http://processors.wiki.ti.com/index.php/Sitara_AM35x_CAN_(HECC)_Linux_Driver
* http://processors.wiki.ti.com/index.php/Sitara_AM35x_CAN_(HECC)_Linux_Driver
-
[[Category:AM35x]][[Category:WhitePaper]]
+
[[Category:AM35x]][[Category:Whitepaper]]

Revision as of 10:03, 31 May 2010

This article explains how to enable the CAN bus using as example the AM35x EVM, but can be applied to other platforms as well.

Contents

Build the SDK with socketcan and ip tools

Working with the CAN buys requires enabling the 'ip' tools from iputils2 package (the 'ip' tool from busybox won't work). The socketcan package is optional and provide you with tools to debug your can bus.

Enable the kernel driver

In the case of the Category:AM35x platform the configuration is:

Linux Kernel Configuration
     Networking support
        CAN bus subsystem support
           CAN device drivers
               Platform CAN drivers with Netlink support
                 CAN bit-timing calculation
                 TI High End CAN controller (HECC)

Setup the networking rules

Edit your /etc/networking/interfaces on the target filesystem and add the following rules (required to setup the bit-rate of the bus:


References

Navigation
Toolbox