1
\$\begingroup\$

I want to add additional network interfaces to my BeagleBone Black. I would like to use an Ethernet module I found, EM2803_SCH, and want to figure out how to configure the pins on my BeagleBone's expansion ports such that the Linux distribution running on my BeagleBone will be able to recognize it. I've noticed that the schematic's PIN OUT labels don't match any of the pin names on my BeagleBone's expansion ports, which makes me thing I've missed something terribly important.

Schematic for EM2803_SCH

I'm not looking for a breakdown of how to build this thing. I'd appreciate learning resources more than anything. Is there some information (that is, reading sources, concepts to be familiar with) for what needs to happen to connect my Ethernet module to my BeagleBone?

\$\endgroup\$
7
  • 1
    \$\begingroup\$ I'd start with linux.com/learn/tutorials/… \$\endgroup\$ Jul 16, 2013 at 2:42
  • \$\begingroup\$ Linux GPIO, that's awesome. What about the next step (loading appropriate drivers for it and setting up the network interface). Using GPIO, it looks like I'd just be able to send random electrical signals with some C code I write. \$\endgroup\$
    – sholsapp
    Jul 16, 2013 at 2:50
  • \$\begingroup\$ I'm not up to it myself, yet. Much of this can be handled through simple Bonescript, but much requires dorking with the device tree, which folks seem to have a love/hate relationship with. The linux page links to the Bone Black system manual. Hipstercircuits looks like another great resource, but seems to mainly deal with the device tree. He does talk about SPI \$\endgroup\$ Jul 16, 2013 at 3:00
  • \$\begingroup\$ @ScottSeidman why waste gpio when hardware spi is available? \$\endgroup\$
    – Passerby
    Jul 16, 2013 at 3:00
  • \$\begingroup\$ Walk before flying. The SRM pointed to shows the locations of the SPI pins on P9, and bit banging may well be the easiest start, before starting to swing on that funky device tree \$\endgroup\$ Jul 16, 2013 at 3:06

1 Answer 1

1
\$\begingroup\$

Simple enough. Pins 1 is the SPI Chip Select (GPIO). 2 - 4 are SPI data and clock pins. RST is an active low input (to the ENC28J60) so any GPIO can be used. INT and WOL are active low outputs (from the enc), so a GPIO in input mode on the BeagleBone.

For the SPI pins, you want the p9 header pins 28-31, which are Chip Select, Data Out, Data In, Clock. Any GPIO will work for the other signals.

\$\endgroup\$
8
  • \$\begingroup\$ And "Any gpio will work for the other signals" confuses me because these seem to be "drive them yourself" signals controlled by a file handle. Shouldn't some device driver be running them? \$\endgroup\$
    – sholsapp
    Jul 16, 2013 at 3:13
  • \$\begingroup\$ You have to load the correct driver, the enc28j60 driver should be included with any standard beaglebone linux distro. The gpio would be configurable with the driver config/setup file. How, well, you'll need to google that, its beyond me. The pinout is just simple converting names (The enc is a commonly used spi-ethernet chip for arduinos and the like). \$\endgroup\$
    – Passerby
    Jul 16, 2013 at 3:33
  • \$\begingroup\$ @sholsapp there is a beagleboard (not bone) expansion board that has the enc28j60 on it elinux.org/BeagleBoard_Zippy so you should be able to get it working on the beaglebone, once you get the right software/driver setup. But i have to ask, isn't a 5 dollar usb-ethernet stick simpler? \$\endgroup\$
    – Passerby
    Jul 16, 2013 at 3:35
  • \$\begingroup\$ Hey @Passerby what is pin 8 (CLKOUT) and is this a GPIO, too? \$\endgroup\$
    – sholsapp
    Nov 23, 2014 at 19:26
  • \$\begingroup\$ @sholsapp pin 8 is the enc's pin27. The clock out pin is provided YOU for use as the host controller clock or as a clock source for other devices in the system. The CLKOUT has an internal prescaler which can divide the output by 1, 2, 3, 4 or 8. The CLKOUT function is enabled and the prescaler is selected via the ECOCON register (Register 2-1). It can be set to between 3.125 to 25 mHz based on the ENC's main clock. It is not a gpio. See section 2.3 of the ENC's datasheet. \$\endgroup\$
    – Passerby
    Nov 23, 2014 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.