{"id":405,"date":"2010-04-15T19:20:51","date_gmt":"2010-04-16T03:20:51","guid":{"rendered":"http:\/\/www.bobandeileen.com\/?p=405"},"modified":"2010-04-15T19:20:51","modified_gmt":"2010-04-16T03:20:51","slug":"overo-controller-area-network","status":"publish","type":"post","link":"https:\/\/www.bobandeileen.com\/?p=405","title":{"rendered":"Overo + Controller Area Network"},"content":{"rendered":"<p><a href=\"http:\/\/www.bobandeileen.com\/wp-content\/uploads\/2010\/04\/DSC00907.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bobandeileen.com\/wp-content\/uploads\/2010\/04\/DSC00907-150x150.jpg\" alt=\"\" title=\"DSC00907\" width=\"150\" height=\"150\" class=\"alignnone size-thumbnail wp-image-409\" \/><\/a>I&#8217;ve had a <a href=\"http:\/\/www.bobandeileen.com\/?p=146\">long interest<\/a> in using Controller Area Network (CAN) to communicate between different components such as sensors or <a href=\"http:\/\/www.bobandeileen.com\/?p=155\">GPS modules<\/a> or motor controllers. I wasn&#8217;t sure if I could do this with the Gumstix Overo board, but I got excited when I found out that Linux kernel version 2.6.33 would be including a driver for the Microchip MCP2515 CAN chip.<\/p>\n<p>This required creating a custom image for the Overo, which meant setting up a build with OpenEmbedded. The Gumstix guys made it <a href=\"http:\/\/www.gumstix.net\/Documentation\/view\/Overo-Setup-and-Programming\/Setting-up-a-build-environment\/109.html\">sound pretty easy<\/a> in their instructions, so I set off to make it happen. I started with a virtual machine with Ubuntu 9.10 and set up bitbake and OpenEmbedded as suggested.<\/p>\n<p>I&#8217;ve <a href=\"http:\/\/www.bobandeileen.com\/robotdev\/mcp251x_kernel_oe.tgz\">uploaded a tarball<\/a> of my user.collection directory with overrides for the Overo machine configuration (you could probably ignore that) and for the Linux 2.6.33 recipe to include my configuration and patches to the Overo&#8217;s board initialization code for the MCP2515 chip on SPI bus 1 chip select 0.<\/p>\n<p>My working environment for the org.openembedded.dev component uses change d535da0dfe20e965adb49d3acf720e7f9feb58c6. I&#8217;m sure by the time you try this there will be newer versions, but I can&#8217;t say whether my patches will work or not.<\/p>\n<p>As for the hardware, the Overo uses 1.8v internally but the MCP2515 uses 5v. I used a few <a href=\"http:\/\/www.sparkfun.com\/commerce\/product_info.php?products_id=8745\">SparkFun logic level converter boards<\/a> to translate voltages. Despite what you might read on their website, DO NOT USE the RX channels as this will send 2.5v into the 1.8v-capable pins on the Overo! Only use the TX channels (they are bidirectional and work at the correct voltage). I needed to translate five pins (SCLK, MISO, MISO, CS, and an interrupt pin) so I used three of the SparkFun boards.<\/p>\n<p>I was able to use the candump program from the socket-can test tools suite to verify correct operation. Awesome!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve had a long interest in using Controller Area Network (CAN) to communicate between different components such as sensors or GPS modules or motor controllers. I wasn&#8217;t sure if I could do this with the Gumstix Overo board, but I got excited when I found out that Linux kernel version 2.6.33 would be including a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,8,4],"tags":[],"class_list":["post-405","post","type-post","status-publish","format-standard","hentry","category-electronics","category-robots","category-software"],"_links":{"self":[{"href":"https:\/\/www.bobandeileen.com\/index.php?rest_route=\/wp\/v2\/posts\/405","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bobandeileen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bobandeileen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bobandeileen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bobandeileen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=405"}],"version-history":[{"count":8,"href":"https:\/\/www.bobandeileen.com\/index.php?rest_route=\/wp\/v2\/posts\/405\/revisions"}],"predecessor-version":[{"id":414,"href":"https:\/\/www.bobandeileen.com\/index.php?rest_route=\/wp\/v2\/posts\/405\/revisions\/414"}],"wp:attachment":[{"href":"https:\/\/www.bobandeileen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=405"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bobandeileen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=405"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bobandeileen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=405"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}