1

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?

sholsapp
  • 217
  • 2
  • 8
  • 1
    I'd start with http://www.linux.com/learn/tutorials/725368-getting-started-with-the-beaglebone-black-a-1ghz-arm-linux-machine-for-45 – Scott Seidman Jul 16 '13 at 02:42
  • 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. – sholsapp Jul 16 '13 at 02:50
  • 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 – Scott Seidman Jul 16 '13 at 03:00
  • @ScottSeidman why waste gpio when hardware spi is available? – Passerby Jul 16 '13 at 03:00
  • 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 – Scott Seidman Jul 16 '13 at 03:06
  • Does it works? It looks really interesting! – JosephITA May 21 '14 at 08:21
  • I've made quite a bit of progress, but still working. I have a follow up question in http://electronics.stackexchange.com/questions/140299/are-all-connections-to-my-enc28j60-required that reveals a bit more of the progress made. – sholsapp Nov 26 '14 at 07:07

1 Answers1

1

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.

Peter Mortensen
  • 1,676
  • 3
  • 17
  • 23
Passerby
  • 72,580
  • 7
  • 90
  • 202
  • 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? – sholsapp Jul 16 '13 at 03:13
  • 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). – Passerby Jul 16 '13 at 03:33
  • @sholsapp there is a beagleboard (not bone) expansion board that has the enc28j60 on it http://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? – Passerby Jul 16 '13 at 03:35
  • Hey @Passerby what is pin 8 (CLKOUT) and is this a GPIO, too? – sholsapp Nov 23 '14 at 19:26
  • @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. – Passerby Nov 23 '14 at 21:37
  • So I finally got this thing wired up, the device tree written, and the kernel loading the correct drivers. Thanks for your help. Now I just need a networking wizard to tell me why the interface wont' send/receive. :) – sholsapp Nov 26 '14 at 04:56
  • @sholsapp `if config -a` is the interface up and have a valid address,? – Passerby Nov 26 '14 at 14:46
  • Hey @Passerby, when you said `Pins 1 is the SPI Chip Select (GPIO)`, why did you qualify with `(GPIO)`? Shouldn't I just use the SPI1_CS0 pin? Or is an additional GPIO required somehow? – sholsapp Dec 10 '14 at 07:06