|
The Beagle board provides a expansion header that adds many interesting
capabilities to this amazing little board. There are a few minor
barriers
to using the expansion header. For the PPP talk where the
Beagle needed to talk to another board using a UART interface
to demonstrate PPP, a simple expansion board was built. Pictures of
the
expansion board can be seen in the upper left side of the mounted
board.
This was done using point to point wiring on a common perf board.
This expansion board provides for GPIO to control a LED
powered by 5V
and also interfaces the RX and TX lines of the UART on the beagle to
the
UART of the Hammer running at 3.3V. A LDO is on board to provide 3.3V
for the I/O voltage.

Block diagram of the simple expansion board in green.
Basics
The expansion header is supplied as a 0.1" (2.54mm) pitch dual row
header footprint on one corner of the board. As supplied, the footprint
unpopulated. The first decision one must make when using the header is
how
to mount the header. It can be done on top (as done on my board) or on
the
bottom. Obvious trade offs are - bottom mount allows a smaller overall
foot print as you can fold the expansion board underneath the beagle. A
top mount is likely to require you to angle the board away due to the
height
of the connectors. This is all assuming the mating board will have the
appropriate 0.1" sockets on it. The limitation comes in how well the
pins
will reach the socket. This doesn't matter if you plan to extend it
with
a IDC cable or use extra length pins (i.e. wirewrap or 2 layer high
pins).
The decision to use a top mount was due to the length
availability of the mounting screws used to hold down the beagle to the
board. A bottom mount
meant the board needs to stand up a lot higher. The overall height
would
exceed the length of a commonly available #6 machine screw - 2inches.
If the board were not mounted as it is, some consideration as to how
the board
should be made.
Electrical issues
The beagle uses 1.8V for all signaling. There is a 5V supply and
a very low power 1.8V reference available on the header. This gives two
basic things that needs to be handled in any expansion board.
First issue is the power. Unless the board will be using a very
low power device that takes only 1.8V, other voltages is likely to be
needed. The easiest way to handle this for low powers is an LDO. They
are similar to
the common 78xx or LM317 devices used in yesteryear for 5V supplies.
Commonly
3 terminals like the 78xx series but the LDOs are not as tolerant of
variation in choice of support components like bypass capacitors. The
best
thing to do about this is to follow the manufacture app notes carefully.
It is worth pointing out that on paper, it is possible to
still use some of
the older less picky devices like the LM317. However, consider the
voltages
here -
A 10% 5V power supply can be as low as 4.5V.
For a 3.3V supply, this leaves exactly 1.2V of headroom. Per the
LM317 datasheet, at 20mA @ 25C it typically has a drop out of a little
over
1.6V. So at the low end, this will not work; at the high end of the
voltage,
it may work.
The second issue that needs to be addressed is the 1.8V
signaling. The are three basic groups of things is encountered:
- Outputs (from the beagle)
- Inputs (from the beagle)
- Bidirectional
There are dedicated devices to do all the conversions and they work
well.
The complication here is most such devices are in unfriendly packages
(leadless, small bgas, etc.).
Going in reverse order, bidirectional lines are the trickiest.
This unfortunately, is what is needed for using the I2C functionality.
For this,
either a dedicated chip or a slightly more complex design involving a
single
MOSFET can be used. Note that the MOSFET needs to have a gate threshold
suitable for 1.8V.
Inputs and outputs into the beagle can handled through
different means.
On the simplest, there are 74NNNxxx series devices typically powered
with
a 1.8V and a second voltage. They work just find and are needed for
higher
speeds. A slightly different approach for slower signals is a simple
open collector setup. This is what was chosen.
For a simple open collector setup, a open collector buffer
that is tolerant
of the higher I/O voltage is chosen. The are several 74XXXnn devices
that
will do this; just make sure it is spec'ed down to 1.8V operation and
the voltage tolerance is spec'ed for the I/O voltage. The device is
powered off 1.8V to setup the thresholds.
For output, the input of the buffer is connected to the
beagle. The collector/drain resistor is connected up to the I/O
voltage. For inputs, the input of the buffer goes to the I/O signal and
the collector/drain resistor goes to 1.8V. The main problem with this
approach
is the speed of the signals. EE details - the entire setup has a
certain
capacitance. The collector/drain resistor is along with the capacitance
forms a RC delay. Reducing the resistor helps but you burn more power
through
the transistor and there is a limit to how much current will the
transistor
all.
Software magic
The OMAP3 has more functionality then there are pins to bring them out.
To select between which functionality, there is a pin multiplexer
(pin mux for short) that needs to be programmed. For a typical OMAP3
setup like the Beagle board, the pin mux is setup in one of
the following ways:
- Power on reset
- U-boot
- Linux
Power on reset settings are documented in the OMAP3 manual. It lists
the
default state if nothing else touches it.
U-boot also configures the pin mux. The exact configuration
depends on
the version of U-boot used. For the best result, check the source. For
one off boards, this can be a simple place to configure the pin mux.
Finally, Linux can also configure the pin mux. This is most
likely the
place to do it for most people and is the place that was for the this
expansion board.
Another note to keep in mind is the Pin mux configuration can
conflict. For
an output pin, signals routed to multiple pins appear to be okay but
for input
pins, one needs to be be sure only one pin is enabled for that
functionality.
For example, to bring out the UART on the expansion header, the TX
functionality was a simple reprogram. However, the RX functionality is
a little more complex as the RX line can be routed to 2 different pins.
By
the time Linux has control, RX was routed to another pin that was not
available on the header. Adding an enable to select RX on the expansion
header didn't work. Had to explicitly change the other pin to some
other
functionality before RX would work.
In addition to the pin mux, there might be other things that
needs to be
configured. This depends on the functionality required but for the case
of this expansion board, the GPIO needs to be setup. GPIOs needs to be
configured for either input or output.
More details on pin mux configuration can be found in this article
Putting it together
With consideration for the above issues, the following parts was used:
- LT1117-3.3 LDO
- This is chosen simply because the local supplier had them.
Nothing
special.
- 74LVC06
- The LVC series can run down to 1.65V and will tolerate up
to 5V on the input side. This particular part is a hex inverter. For
interfacing to the
UART, 2 inverter had to be run in series to provide a non inverted
output.
This part was also chosen on because the local supplier had them.
With careful choice of SMT packages, the entire expansion board can be
hand assembled on perf board.
Software wise, the pins were programed. The Linux kernel has a
frame
work for support LEDs so it was a matter of defining LEDs on the
particular
GPIO. The UART functionality worked without any changes other then pin
mux programming. The version of the kernel used didn't have the right
definitions for the pin mux but that was a minor addition.
Questions/Comments?
|