Difference between revisions of "BeagleBone Black RFID Adaptor Cape"

From eLinux.org
Jump to: navigation, search
(Description: Added pin usage)
(Formated pictures)
Line 1: Line 1:
 +
[[File:Cape_Pin_Usage.jpg|right|300px|BeagleBone Pin Usage]]
 
== Description ==
 
== Description ==
 
[[File:Cape_Pin_Usage.jpg|right|link=|BeagleBone Pin Usage]]
 
 
 
The RFID adaptor cape is an interface between the Beaglebone Black (BBB) and Texas Instrument's TRF7970ATB, (Multi-Protocol Fully Integrated 13.56-MHz RFID and NFC Transceiver) It allows users to have fully functional RFID and NFC capabilities on the BBB. The adaptor board also features four additional LEDs and a push button.
 
The RFID adaptor cape is an interface between the Beaglebone Black (BBB) and Texas Instrument's TRF7970ATB, (Multi-Protocol Fully Integrated 13.56-MHz RFID and NFC Transceiver) It allows users to have fully functional RFID and NFC capabilities on the BBB. The adaptor board also features four additional LEDs and a push button.
  
Line 8: Line 6:
  
 
== Schematic ==
 
== Schematic ==
[[File:RFID Cape Schematic.png|thumb|400px|center|RFID Adaptor Cape Schematic]]
+
[[File:RFID Cape Schematic.png|thumb|400px|left|RFID Adaptor Cape Schematic]]
[[File:RFID Cape Layout.png|thumb|400px|center|RFID Adaptor Cape Layout]]
+
[[File:RFID Cape Layout.png|thumb|500px|center|RFID Adaptor Cape Layout]]
 +
<br/><br/><br/><br/><br/>
  
 
== Sample Code ==
 
== Sample Code ==

Revision as of 20:56, 23 July 2013

BeagleBone Pin Usage

Description

The RFID adaptor cape is an interface between the Beaglebone Black (BBB) and Texas Instrument's TRF7970ATB, (Multi-Protocol Fully Integrated 13.56-MHz RFID and NFC Transceiver) It allows users to have fully functional RFID and NFC capabilities on the BBB. The adaptor board also features four additional LEDs and a push button.

The communication between the BBB and the TB is via SPI. Since SPI pins are not automatically enabled on BBB, a device tree overlay is used to configure the pins properly for SPI use.

Schematic

RFID Adaptor Cape Schematic
RFID Adaptor Cape Layout






Sample Code

SPI Device Tree Overlay Setup

NOTE: You CAN NOT use SPI1 on the BeagleBone Black WITHOUT disabling the HDMI interface
Create a file called BB-SPI1-01-00A0.dts and copy-paste the following code into the file

/dts-v1/;
/plugin/;

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

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

    fragment@0 {
        target = <&am33xx_pinmux>;
        __overlay__ {
            spi1_pins_s0: spi1_pins_s0 {
                        pinctrl-single,pins = <
                                0x190 0x33      /* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */
                                0x194 0x23      /* mcasp0_fsx.spi1_d0, INPUT_PULLDOWN | MODE3 */
                                0x198 0x03      /* mcasp0_axr0.spi1_d1, OUTPUT_PULLDOWN | MODE3 */
                                0x19c 0x13      /* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
                >;
            };
        };
    };

    fragment@1 {
        target = <&spi1>;
        __overlay__ {

             #address-cells = <1>;
             #size-cells = <0>;
             status = "okay";
             pinctrl-names = "default";
             pinctrl-0 = <&spi1_pins_s0>;
             cs-gpios  = <&gpio4 17 0>;

             spidev@0 {
                 spi-max-frequency = <16000000>;
                 reg = <0>;    /* Use 0 if you want CS0 */
                 compatible = "linux,spidev";
                 spi-cpha;
            };
        };
    };
};

Compile the dtc:

dtc -O dtb -o BB-SPI1-01-00A0.dtbo -b 0 -@ BB-SPI1-01-00A0.dts

Then, copy the file into /lib/firmware/:

 cp BB-SPI1-01-00A0.dtbo /lib/firmware/

Then enable the device tree overlay:

 echo BB-SPI1-01 > /sys/devices/bone_capemgr.*/slots

Plug in your BBB to a host computer using the mini usb data cable.

Go to My Computer>BeagleBone Getting Started> and open uEnv.txt Copy and paste this command into the .txt file. Make sure to save your changes. (Ctrl+s)

optargs=quiet drm.debug=7 capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
capemgr.enable_partno=BB-SPI1-01

after you save the changes, reboot your beaglebone black
Make sure it is enabled You should now have two spidev-files in the folder /dev/

ls -al /dev/spidev1.*

Eagle Files

References