Difference between revisions of "Beaglebone Black"

(Created page with "Category:Documentation Category:Advanced_Topics The AlarmDecoder [http://www.alarmdecoder.com/catalog/product_info.php/products_id/33 AD2PI] also supports other embed...")
 
(Steps)
Line 13: Line 13:
 
<ol>
 
<ol>
 
<li>Make sure your BeagleBone and AD2PI are disconnected from power and the panel, respectively.</li>
 
<li>Make sure your BeagleBone and AD2PI are disconnected from power and the panel, respectively.</li>
<li>Connect the pins.  See the images on the sidebar if you need a visual reference. [[File:bb_ad2pi.jpg|thumb|AD2PI]] [[File:bb_beaglebone.jpg|thumb|BeagleBone Black]]</li>
+
<li>Connect the pins between CONN2 on the AD2PI and P9 on the BeagleBone Black.  See the images on the sidebar if you need a visual reference. [[File:bb_ad2pi.jpg|thumb|AD2PI]] [[File:bb_beaglebone.jpg|thumb|BeagleBone Black]]</li>
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
! scope="col" width="60px" | Conn
 
! scope="col" width="60px" | Conn
! scope="col" width="100px" | AD2PI Pin
+
! scope="col" width="120px" | AD2PI CONN2 Pin
! scope="col" width="100px" | BeagleBone Pin
+
! scope="col" width="120px" | BeagleBone P9 Pin
 
|-
 
|-
 
| align="center" | GND
 
| align="center" | GND
Line 37: Line 37:
  
 
<li>Connect power to your BeagleBone and boot it up.</li>
 
<li>Connect power to your BeagleBone and boot it up.</li>
<li>Enable UART (instructions based on those found [http://hipstercircuits.com/enable-serialuarttty-on-beaglebone-black/ here])</li>
+
<li>Enable UART5 (<tt>/dev/ttyO4</tt>) (instructions based on those found [http://hipstercircuits.com/enable-serialuarttty-on-beaglebone-black/ here])</li>
 
<ol>
 
<ol>
 
<li>Create a file named <tt>enable-art5.dts</tt> containing the [[#DTS_Script|DTS script to enable UART5]].</li>
 
<li>Create a file named <tt>enable-art5.dts</tt> containing the [[#DTS_Script|DTS script to enable UART5]].</li>

Revision as of 12:20, 6 January 2014


The AlarmDecoder AD2PI also supports other embedded systems that can use TTL RS-232 such as the BeagleBone Black. It's a fairly simple process to wire everything up and configure the BeagleBone to communicate with your device.

What you need

  • An AlarmDecoder AD2PI
    • NOTE: The AD2PI pictured is a development board with an extra long pin header. You'll need to solder the connection or go in through the bottom.
  • A BeagleBone Black
  • Wires & solder

Steps

  1. Make sure your BeagleBone and AD2PI are disconnected from power and the panel, respectively.
  2. Connect the pins between CONN2 on the AD2PI and P9 on the BeagleBone Black. See the images on the sidebar if you need a visual reference.
    AD2PI
    BeagleBone Black
  3. Conn AD2PI CONN2 Pin BeagleBone P9 Pin
    GND 6 1
    3.3V 1 3
    RX 10 11
    TX 8 13
  4. Connect power to your BeagleBone and boot it up.
  5. Enable UART5 (/dev/ttyO4) (instructions based on those found here)
    1. Create a file named enable-art5.dts containing the DTS script to enable UART5.
    2. Compile the device tree overlay:
      • dtc -O dtb -o enable-uart5-00A0.dtbo -b O -@ enable-uart5.dts
    3. Copy the compiled file to /lib/firmware
      • cp enable-uart5-00A0.dtbo /lib/firmware
    4. Enable the overlay:
      • echo enable-uart5 >/sys/devices/bone_capmgr.*/slots
    5. Your device should now show up as /dev/ttyO4.
  6. Test your device:
    1. Open the serial port with screen:
      • screen /dev/ttyO4 115200
    2. Confirm communication with the device by rebooting it with =.
    3. Exit screen by typing Ctrl+A+K.

DTS script

/*
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
/dts-v1/;
/plugin/;

/ {
    compatible = "ti,beaglebone", "ti,beaglebone-black";

    /* identification */
    part-number = "uart5";

    fragment@0 {
        target = <&am33xx_pinmux>;
        __overlay__ {
            pinctrl_uart5: pinctrl_uart5_pins {
                pinctrl-single,pins = <                                    
                        0x070 0x26  /* P9_11 = GPIO0_30 = GPMC_WAIT0 , MODE6 */
                        0x074 0x06  /* P9_13 = GPIO0_31 = GPMC_WPN, MODE6 */
                >;
            };
        };
    };

    fragment@1{
        target = <&uart5>;
        __overlay__ {
            status          = "okay";
        };
    };

    fragment@2 {
        target = <&ocp>;
        __overlay__ {
            test_helper: helper {
                compatible = "bone-pinmux-helper";
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_uart5>;
                status = "okay";
            };
        };
    };
};