LJ/doc/etherdream/manual.html

196 lines
9.2 KiB
HTML
Raw Normal View History

2023-06-03 12:43:53 +00:00
<!DOCTYPE html>
<html>
<head>
<title>Ether Dream - Developer Manual</title>
<link rel="stylesheet" type="text/css" href="main.css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<img src="etherdream.png" width="298" height="75" alt="ether dream">
<div id="header"><a href="protocol.html">Ether Dream</a></div>
<div id="content">
<h1>Ether Dream - Developer Manual</h1>
<h2 style="color:red"><em>NOTE</em> - This page is for the previous Ether Dream 1. Check the <a href="/">current website</a>.</h2>
<h2>Contents</h2>
<ul>
<li><a href="#intro">Introduction</a></li>
<li><a href="#hw">Hardware</a></li>
<li><a href="#config">Configuration</a></li>
<li><a href="#protocol">Protocol</a></li>
<li><a href="#dev">Development</a></li>
<li><a href="#fw">Firmware Updates</a></li>
</ul>
<h2 id="intro">Introduction</h2>
<p>
This is a work-in-progress developer-oriented guide to the hardware features and software architecture
of the Ether Dream DAC. For setup and usage tips, see the <a href="/userguide.html">User
Guide</a>.
</p>
<h2 id="hw">Hardware</h2>
<img src="etherdreamboard.png" alt="Ether Dream board diagram" width="700" height="357">
<p>
Starting at the Ethernet connector on the board and moving counterclockwise, the
hardware features and connectors on the board are:
</p>
<ul>
<li>Ethernet connector - includes link and activity LEDs</li>
<li>USB connector. This is currently used only for firmware upgrades.</li>
<li>Status LED. This LED blinks when the board is in bootloader mode, and
is on normally.</li>
<li>MicroSD slot. This will be used, in future software updates, for settings
and playback of stored shows.</li>
<li>External power jack. This is a 2.1mm/5.5mm barrel connector, center-positive,
accepting 8V-25V DC.</li>
<li>Power supply screw terminals. Ground is on the left (towards the outside of
the board), positive is on the right (towards the inside of the board).
The two power inputs are isolated from one another with diodes; if both
are connected, power will be drawn only from the one with the higher voltage.</li>
<li>GPIO header. This connects extra pins from the microcontroller. Pin 1 is closest
to the power jack. The pinout is:
<table class="grid">
<tr><td>1 - P1[8] / PWM1[1] / CAP1[0]</td><td>2 - +5.5v supply</td></tr>
<tr><td>3 - P1[19] / MCOA0 / CAP1[1]</td><td>4 - P1[22] / MCOB0 / MAT1[0]</td></tr>
<tr><td>5 - P1[26] / MCOB1 / PWM1[6] / CAP0[0]</td><td>6 - P1[29] / MCOB[2] / PCAP1[1] / MAT0[1]</td></tr>
<tr><td>7 - +3.3v supply</td><td>8 - P0[15] / TXD1 / SCK0 / SCK</td></tr>
<tr><td>9 - ground</td><td>10 - P0[17] / CTS1 / MISO0 / MISO</td></tr>
<tr><td>11 - P0[18] / DCD1 / MOSI0 / MOSI</td><td>12 - P0[16] / RXD1 / SSEL0 / SSEL</td></tr>
</table>
</li>
<li>Serial header #2. Pinout:
<table class="grid">
<tr><td>1 - P0[10] / TXD2 / SDA2 / MAT3[0]</td><td>2 - +5.5v supply</td></tr>
<tr><td>3 - P0[11] / RXD2 / SCL2 / MAT3[1]</td><td>4 - +3.3v supply</td></tr>
<tr><td>5 - P1[28] / MCOA2 / PCAP1[0] / MAT0[0]</td><td>6 - ground</td></tr>
</table>
</li>
<li>Interlock LED (yellow). This LED is on whenever the interlock relay is closed.</li>
<li>ILDA DB-25 connector.</li>
<li>Behind the DB-25 connector: 2x13 pin header wired identically to the DB-25.</li>
<li>Emission LED (green). Whenever the DAC is producing output, this LED is on.</li>
<li>20-pin ARM JTAG header. Pin 1 is towards the power connectors.</li>
<li>1x6 pin serial debug header. This is intended to be used for debug purposes with a
TTL serial adapter, such as <a href="http://www.sparkfun.com/products/9717">this unit</a>
available from sparkfun. Pin 1 is closest to the Ethernet connector. The pinout is:
<table class="grid">
<tr><td>1 - P2[10]/EINT0/NMI</td></tr>
<tr><td>2 - P0[2] / TXD0 / AD0[7]</td></tr>
<tr><td>3 - P0[3] / RXD0 / AD0[6]</td></tr>
<tr><td>4 - unconnected</td></tr>
<tr><td>5 - unconnected</td></tr>
<tr><td>6 - ground</td></tr>
</table>
</li>
<li>Serial header #1. Pinout:
<table class="grid">
<tr><td>1 - P2[0] / PWM1[1] / TXD1</td><td>2 - +5.5v supply</td></tr>
<tr><td>3 - P2[1] / PWM1[2] / RXD1</td><td>4 - +3.3v supply</td></tr>
<tr><td>5 - P2[2] / PWM1[3] / CTS1</td><td>6 - ground</td></tr>
</table>
</li>
<li>Serial header #3. Pinout:
<table class="grid">
<tr><td>1 - P0[25] / AD0[2] / I2SRX_SDA / TXD3</td><td>2 - +5.5v supply</td></tr>
<tr><td>3 - P0[26] / AD0[3] / AOUT / RXD3</td><td>4 - +3.3v supply</td></tr>
<tr><td>5 - P2[3] / PWM1[4] / DCD1</td><td>6 - ground</td></tr>
</table>
</li>
</ul>
<h2 id="config">Configuration</h2>
<p>
The Ether Dream requires no network configuration. By default, it will attempt to acquire
an IP address with DHCP; if no DHCP server is found, it will instead choose a link-local
169.254.x.x address. Once it has an address, it will begin advertising its presence with
UDP broadcast packets on port 7654. The playback DLL looks for these broadcasts to find
DACs on the network.
</p>
<h2 id="protocol">Protocol</h2>
<p>
Protocol documentation is <a href="protocol.html">here</a>.
</p>
<p>
Drivers are available for <a href="https://github.com/j4cbo/j4cDAC/tree/master/driver/">Windows</a>
and <a href="https://github.com/j4cbo/j4cDAC/tree/master/driver/libetherdream/">Mac/Linux</a>.
</p>
<h2 id="dev">Development</h2>
The Ether Dream firmware, available <a href="https://github.com/j4cbo/j4cDAC">on github</a>,
builds on a standard Linux system with the free CodeSourcery ARM toolchain. The README in the
repository describes the needed tools.
<h2 id="fw">Firmware Updates</h2>
There are three ways of updating the Ether Dream's firmware:
<ol>
<li><b>USB</b>
<p>
The Ether Dream board comes with a USB bootloader in the first 16kB of Flash. (Source
for the bootloader is in the boot/ directory of the source tree.) This bootloader
implements the standard DFU protocol; the <a href="http://wiki.openmoko.org/wiki/Dfu-util"
>dfu-util</a> project provides a PC-side tool.
</p>
<p>
The bootloader runs on every power-up, but normally immediately jumps to the main firmware.
If the firmware is corrupt or the DAC has been forced into bootloader mode, it will
instead run and appear as a USB DFU device. This mode is indicated by the LED
next to the USB connector flashing rapidly. There are
two ways to force the DAC to run in bootloader mode:
</p>
<ul><li>Hold P0[18] low during power-on.</li>
<li>Send a special USB control request while the normal firmware is running.
There is <a href="https://github.com/j4cbo/j4cDAC/tree/master/tools/f0ad">a tool to
do this</a> in the source repository.</li></ul>
<p>The pin to force bootloader mode, P0[18], is located next to a ground pin on the 2x6
expansion header. Connect a jumper across these pins and then apply power to run
the bootloader.
</p><p>
<img src="bootloader-jumper.jpg" width="366" height="186" alt="bootloader jumper">
</p><p>
On the host PC, if dfu-util is installed, running "make bl" in the firmware directory
will automatically update the firmware of an attached DAC. Either force the DAC into
bootloader mode and run "make bl", or "make bl" while the DAC is running its usual
firmware; in the latter case, the DAC will be rebooted into bootloader mode and then
updated.
</p>
</li>
<li><b>Serial</b>
<p>There is a built-in ROM bootloader on the LPC1758 which runs over UART0,
connected to the 1x6 header on the board. It enters if P2[10] is held low when
power is applied. When the ROM bootloader is running, both LEDs on the board will
be very dimly lit. The <a href="http://sourceforge.net/projects/lpc21isp/">lpc21isp</a>
tool talks to the DAC in this mode.
</p>
<p>
P2[10] on the LPC1758 is connected to RTS on the 6-pin serial header. Running "make
flash" in the firmware directory and then applying power to the DAC will
update the firmware and USB bootloader over serial.
</p>
<p>This method is somewhat slower than the USB bootloader and so is not generally
recommended - it is useful primarily for installing the firmware into a
previously-unprogrammed DAC. Also, note that the 6-pin serial header is <i>logic-level</i>;
it is 5-volt-tolerant but must not be connected directly to an RS-232 port.
</p>
</li>
<li><b>JTAG</b>
<p>The LPC1758 Flash can be reprogrammed over JTAG with openocd. See the
user's manual for the microcontroller and the openocd documentation for details.</p>
</li>
</ol>
</div>
<div id="footer">
&copy; 2010-2021 Jacob Potter.
</div>
<div id="menu">
<ul>
<li><a href="../index.html">LJ doc</a></li>
<li><a href="protocol.html">Protocol</a></li>
<li><a href="userguide.html">V1 User Guide</a></li>
<li><a href="manual.html">V1 Developer Manual</a></li>
<li><a href="dmx.html">V1 DMX Board</a></li>
</ul>
</div>
</body>
</html>