Download Stellaris LM3S6432 Serial-to-Ethernet
Transcript
Stellaris® Serial-to-Ethernet Reference Design Kit User ’s Manual RDK-S2E-04 Co pyrigh t © 2 008– 200 9 Te xas In strumen ts Copyright Copyright © 2008–2009 Texas Instruments, Inc. All rights reserved. Stellaris and StellarisWare are registered trademarks of Texas Instruments. ARM and Thumb are registered trademarks, and Cortex is a trademark of ARM Limited. Other names and brands may be claimed as the property of others. Texas Instruments 108 Wild Basin, Suite 350 Austin, TX 78746 Main: +1-512-279-8800 Fax: +1-512-279-8879 http://www.luminarymicro.com 2 November 4, 2009 Stellaris® S2E RDK User’s Manual Table of Contents Chapter 1: Stellaris® Serial-to-Ethernet Reference Design Kit Overview ................................................... 7 Using the RDK .................................................................................................................................................... 7 Features.............................................................................................................................................................. 8 Kit Contents ........................................................................................................................................................ 8 Description.......................................................................................................................................................... 8 Serial-to-Ethernet Module ............................................................................................................................... 8 Serial-to-Ethernet Connector Board................................................................................................................ 9 Flow Control...................................................................................................................................................... 10 Installation......................................................................................................................................................... 10 Specifications.................................................................................................................................................... 11 Electrical ....................................................................................................................................................... 11 Mechanical.................................................................................................................................................... 11 Chapter 2: Serial-to-Ethernet Configuration and Firmware Update........................................................... 13 Accessing the Configuration Website ............................................................................................................... 13 Using the Finder Utility.................................................................................................................................. 13 Using “My Network Places”........................................................................................................................... 14 Using the LM S2E Browser Application ........................................................................................................ 15 Home Page ................................................................................................................................................... 15 Port 0 and Port 1 Settings Pages ..................................................................................................................... 16 Miscellaneous Settings Page............................................................................................................................ 18 Firmware Update Page..................................................................................................................................... 19 Chapter 3: Using the S2E Module as a Serial Extender over Ethernet ...................................................... 21 Chapter 4: Using Serial-to-Ethernet as a Virtual COM Port ........................................................................ 23 Overview........................................................................................................................................................... 23 Install com0com ................................................................................................................................................ 23 Install com2tcp.................................................................................................................................................. 28 Install LM PC S2E Configuration ...................................................................................................................... 28 Configure VCP Using the LM S2E PC Configuration Application ..................................................................... 29 Connection Creation ..................................................................................................................................... 30 Edit port names............................................................................................................................................. 32 Manual VCP Configuration ............................................................................................................................... 32 Verify VCP Operation ....................................................................................................................................... 33 Chapter 5: Hardware Description .................................................................................................................. 35 Block Diagram .................................................................................................................................................. 35 Appendix A: Schematics................................................................................................................................ 37 Appendix B: Bill of Materials (BOM) ............................................................................................................. 39 November 4, 2009 3 List of Figures Figure 1-1. Figure 1-2. Figure 1-3. Figure 1-4. Figure 2-1. Figure 2-2. Figure 2-3. Figure 2-4. Figure 3-1. Figure 4-1. Figure 4-2. Figure 4-3. Figure 4-4. Figure 4-5. Figure 4-6. Figure 4-7. Figure 5-1. 4 Serial-to-Ethernet Module and S2E Connector Board .................................................................... 7 Serial-to-Ethernet Module ............................................................................................................... 9 Serial-to-Ethernet Connector Board ................................................................................................ 9 S2E Module Connection to S2E-CKIT .......................................................................................... 11 LM S2E Browser Window.............................................................................................................. 15 Home Page of the Configuration Website ..................................................................................... 16 Port 0 Configuration Window......................................................................................................... 18 Miscellaneous Settings Page ........................................................................................................ 19 Implementing a Serial Extender over Ethernet.............................................................................. 21 Typical S2E Module ..................................................................................................................... 23 Luminary Micro menu group.......................................................................................................... 29 S2E module connection over Ethernet.......................................................................................... 30 Main LM S2E Configuration application window ........................................................................... 31 Manual VCP configuration............................................................................................................. 33 Com2tcp communication shown in the command prompt window................................................ 33 HyperTerminal File Properties Dialog ........................................................................................... 34 Serial-to-Ethernet Block Diagram.................................................................................................. 35 November 4, 2009 Stellaris® S2E RDK User’s Manual List of Tables Table 1-1. Table 1-2. Table B-1. Table B-2. J2 Header Signals ......................................................................................................................... 10 J3 Header Signals ......................................................................................................................... 10 Serial-to-Ethernet Bill-of-Materials ................................................................................................ 39 Serial-to-Ethernet Connector Board Bill-of-Materials .................................................................... 40 November 4, 2009 5 6 November 4, 2009 C H A P T E R 1 Stellaris® Serial-to-Ethernet Reference Design Kit Overview Stellaris Reference Design Kits (RDKs) accelerate product development by providing ready-to-run hardware. This kit includes all the necessary cables, S2E connector board, and software to run a demo application out of the box. Figure 1-1. Serial-to-Ethernet Module and S2E Connector Board1 Front Back Using the RDK The recommended steps for using the RDK are: Follow the Quickstart Guide included in the kit. The Quickstart guide will help you get the S2E module up and running in minutes. It also contains important safety information that should be read before using the RDK. Follow the appropriate chapters in this document to configure the S2E module for a specific application. If required, customize the S2E module hardware and software. Texas Instruments provides full source code and design files. 1. Images are not shown to scale. November 4, 2009 7 Stellaris® Serial-to-Ethernet Reference Design Kit Overview Features The S2E module is intended as a simple add-on product to existing systems to provide network connectivity. The RDK contains all the necessary hardware to quickly evaluate the module capabilities. The S2E module RDK has the following features: LM3S6432 Stellaris microcontroller with 96 kB of Flash memory and 32 kB of SRAM 10/100 Mbit Ethernet port Two serial ports – PORT0 is an asynchronous serial port with RS232 levels • Data rates up to 230,400 bits/sec • Includes RTS/CTS for flow control – PORT1 has 4 CMOS/TTL level signals that can be configured several ways • Data rates up to 1 Mbit/sec. • As an asynchronous serial port with RTS/CTS flow control or with 2 GPIOs • As 4 GPIOs • As a synchronous serial port (master or slave) with support for SPI, uWire, and other synchronous protocols RDK is USB-powered, no additional power supply required Ethernet boot loader for firmware upgrades JTAG 10-pin debug header Kit Contents S2E Module: Serial-to-Ethernet module S2E-CKIT: Serial-to-Ethernet connector board USB A to miniB cable: For powering the module Serial cable DB9M - DB9F: For connecting module to PC serial port Ethernet retractable cable: For connecting S2E module to the network 20-pin to fine-pitch 10-pin ARM JTAG debug adapter S2E-CKIT standoffs: For optional attachment to S2E-CKIT board Description Serial-to-Ethernet Module Figure 1-2 shows the S2E module diagram. The S2E header connector provides the serial port signals and power signals to the module. For the RDK, this is connected to the S2E-CKIT (see Figure 1-3). For more information on the S2E module, see the Serial-to-Ethernet board data sheet. 8 November 4, 2009 Stellaris® S2E RDK User’s Manual Figure 1-2. Serial-to-Ethernet Module JTAG Header Pads Mounting Hole Network Connector RJ45 S2E Header Connector J1 Faceplate Spacers (M3 thread) Mounting Hole Serial-to-Ethernet Connector Board Figure 1-3 shows the Serial-to-Ethernet connector board. The board connects to the S2E module via the J1 connector, and provides connectors for power and serial port connections during RDK evaluation and development. Power can be provided by the USB connector (5 V) or by the J3 header (3.3 V). A power indicator LED turns on when power is applied. Header J2 provides the CMOS/TTL signals for the module Port1 signals, see Table 1-1. The J3 header signals are shown in Table 1-2. Figure 1-3. Serial-to-Ethernet Connector Board USB Power Connector PORT0 Connector Power Indicator USB S2E Socket Connector (Bottom side) D1 DB9F J2 J3 Standoff Holes November 4, 2009 J1 PORT1 Header 3.3V Header 9 Stellaris® Serial-to-Ethernet Reference Design Kit Overview Table 1-1. J2 Header Signals J2 Header Pin Stellaris GPIO Description 1 PD2/PA4 Serial data input to S2E module (UART or SPI) 2 PD3/PA5 Serial data output from S2E module (UART or SPI) 3 PA3 UART CTS output or SPI select signal 4 PA2 UART RTS input or SPI clock signal 5 RSTn Reset input to S2E module (leave unconnected if unused) 6 GND Ground signal Table 1-2. J3 Header Signals J3 Header Pin Signal Description 3.3 V 3.3 V 3.3 V power input. Use only if the USB power connector is not used, otherwise leave unconnected. GND GND Ground signal Flow Control The S2E module supports bidirectional RTS/CTS flow control, as defined in the RS-232 E standard. For the receiver, in this mode of operation, the S2E asserts the CTS signal when it capable of receiving data, and it deasserts the signal when transmission by the remote serial device should be paused. In the S2E module, the CTS signal is asserted by setting the CTS output GPIO for the 0 (or low) level. The signal is deasserted by setting the GPIO output value to the 1 (or high) level. For the transmitter, the RTS GPIO signal is monitored for state changes. When the state changes to asserted, transmission is allowed/resumed. When the state changes to deasserted, transmission is paused. The polarity of the RTS GPIO signal is interpreted in the same way as for the CTS GPIO signal. If the RTS GPIO signal is 1 (or high level), it is considered to be deasserted, and the UART transmitter is disabled (the current byte, if any, is completed). When the signal is 0 or low level), it is considered to be asserted, and the transmitter is re-enabled. Installation The requirements for installation include a PC with an available serial port with a DB9 male connector and a USB port, and an available 10/100Mbit network port. The S2E-CKIT board contains the connectors required for powering and connecting the module, and sits on top of the S2E module. Use the following steps to connect the S2E module to the S2E-CKIT connector board (see Figure 1-4). 1. Attach the provided nylon standoffs to S2E-CKIT (optional). 2. Attach S2E-CKIT to the S2E module. Align the 12-pin socket to the 12-pin connector on the S2E module and press firmly. 10 November 4, 2009 Stellaris® S2E RDK User’s Manual 3. Connect the serial cable: DB9M (male) side to the DB9F(female) connector on the S2E-CKIT and DB9F side to the serial port on the PC. 4. Connect the USB cable MiniAB plug to the S2E-CKIT and the other side to the PC. The green LED on the S2E-CKIT should turn on, indicating that the S2E module is now powered. 5. Connect the ethernet retractable cable to the S2E module and to a network port. Figure 1-4. S2E Module Connection to S2E-CKIT USB DB9F RJ45 J1 Optional Standoffs Specifications Electrical USB power: 5V at 200mA Mechanical S2E module PCB size: 1.475 x 1.555" x 0.63” (39.5 mm x 37.5 mm x 16 mm) S2E-CKIT PCB size: 1.475 x 1.5" x 0.57” (39.5 mm x 38.1 mm x 14.5 mm) November 4, 2009 11 Stellaris® Serial-to-Ethernet Reference Design Kit Overview 12 November 4, 2009 C H A P T E R 2 Serial-to-Ethernet Configuration and Firmware Update The sotware in the S2E module includes an embedded web server that provides a convenient configuration interface. Accessing the Configuration Website You can access the S2E module’s web-based configuration interface: Using the Finder Utility Using “My Network Places” Using the LM S2E Browser Application Using the Finder Utility NOTE: It is assumed that the StellarisWare Firmware Development Package for the S2E has already been installed and that the S2E module has been connected as described in the Installation section of this document. To access the configuration website using the Finder utility: 1. Browse to the \StellarisWare\tools\bin directory. 2. Double click on the finder.exe icon. The Finder utility starts and you should see the S2E module in the list of available Stellaris® boards similar to the screen shot below. November 4, 2009 13 Serial-to-Ethernet Configuration and Firmware Update 3. Start your web browser and type the IP address found in Step 2 into the address bar. The S2E configuration website loads. Using “My Network Places” To access the configuration website without using the S2E configuration application, Windows must first be configured to show icons for networked UPnP devices. To do this in Windows XP, follow these steps: 1. Click Start, and then click Control Panel. Click Add or Remove Programs. 2. Click Add/Remove Windows Components. 3. In the Components list, click to select the Networking Services check box, and then click Details. 4. In the Subcomponents of Networking Services list, click to select UPnP User Interface check box and then click OK. NOTE: To remove the UPnP UI components, click to clear the UPnP User Interface check box. 5. In the Windows Components Wizard, click Next. For more information on Windows and UPnP, visit the Microsoft Help and Support website at http:/ /support.microsoft.com/. To find the UPnP icon for the S2E module, follow these steps: 1. Go to “My Network Places”. “My Network Places” can typically be found by simply clicking Start and then My Network Places. 2. Look for a UPnP icon labeled “Luminary Micro Serial2Ethernet Module”. The label should also include the IP address of the S2E module. Double-clicking on the icon will bring up the configuration website served up by the S2E module in a web browser. 14 November 4, 2009 Stellaris® S2E RDK User’s Manual Figure 2-1. LM S2E Browser Window NOTE: If the “Luminary Micro Serial2Ethernet Module” UPnP icon is not present, ensure that you have configured Windows appropriately to show icons for networked UPnP devices. Using the LM S2E Browser Application If you installed the S2E configuration applications, to access the module configuration website: 1. Click Start, and then select All Programs > Luminary Micro > Serial-to-Ethernet Configuration > LM S2E Browser. 2. The application shows a list of all the S2E modules on your network. If “Searching for devices...” appears below the list, wait a few seconds for the list to populate. 3. Double-click the desired module. Your default web browser launches and loads the selected configuration website. Home Page The home page of the configuration website shows the current status and configuration information. Included are the name, IP address, and MAC address of the S2E module as well as the current port settings for both port 0 and port 1. Figure 2-2 shows the home page of the website hosted by the S2E module. November 4, 2009 15 Serial-to-Ethernet Configuration and Firmware Update Figure 2-2. Home Page of the Configuration Website Port 0 and Port 1 Settings Pages The “Port 0 Settings” page allows configuration of port 0 of the S2E module. Similarly, the “Port 1 Settings” page allows configuration of port 1 of the S2E module. The following configuration options are provided: 16 Baud Rate – specifies the baud rate to be used by the serial port. There are several options from 110 to 230400 bits/S. Data Size – configures the number of data bits per character. The options are 5 to 8 bits / character. Parity – specifies the generation and checking of the parity bit in the data frame and the type of parity used. The options are “None”, “Odd”, “Even”, “Mark”, and “Space”. Stop Bits – specifies the number of stop bits at the end of a frame. Flow Control – specifies the use of flow control. The options are “None” and “Hardware”. Local Telnet Port Number – specifies the local telnet port number to be used. November 4, 2009 Stellaris® S2E RDK User’s Manual Remote Telnet Port Number – specifies the remote telnet port number to be used when the “Telnet Mode” is set to “Client”. Telnet Mode – specifies whether the telnet mode for that port will be “Server” or “Client”. Telnet Protocol – specifies whether the data for the port will be “Telnet” or “Raw”. Telnet Server IP – specifies the IP address of the telnet server when the “Telnet Mode” is set to “Client”. Telnet Timeout – specifies the telnet timeout in seconds. The default is 0 and specifies that no timeout is to be used. After changing the settings, click the “Apply Changes” button to cause the changes to take effect. If the “Make these the default settings” check box is checked before clicking the “Apply Changes” button, then the new settings are applied each time the S2E module is reset. Otherwise, the existing defaults are used whenever the module is next reset. Figure 2-3 shows the configuration page for Port 0. November 4, 2009 17 Serial-to-Ethernet Configuration and Firmware Update Figure 2-3. Port 0 Configuration Window Miscellaneous Settings Page The Miscellaneous Settings page of the website is divided into three sections: “IP Address Selection”, “General Configuration Settings”, and “Restore Factory Defaults”. The “IP Address Selection” portion of the page allows configuration of the S2E module to automatically obtain an IP address or use a static IP address at start up. If the “DHCP/AutoIP” option is chosen, the S2E module will first attempt to get an IP address from a DHCP server. If a DHCP server cannot be located, the S2E module will obtain a link local IP address using the AutoIP protocol. If the “Static IP” option is chosen, then the “Static IP Address”, “Subnet Mask”, and “Default Gateway” fields need to be filled in. Clicking the “Update Settings” button will cause the settings to be saved. The “General Configuration Settings” portion of the page allows modification of the “Module Name” and “UPnP port number”. Clicking the “Update Settings” button will cause the settings to be saved. 18 November 4, 2009 Stellaris® S2E RDK User’s Manual The “Restore Factory Defaults” portion of the page allows restoring all of the options to their default states. Figure 2-4 shows the Miscellaneous Settings page of the website. Figure 2-4. Miscellaneous Settings Page Firmware Update Page The Firmware Update page provides the capability for the application to call the boot loader to initiate a firmware update over Ethernet. Once the boot loader is executing, LM Flash Programmer can be used to update the firmware. LM Flash Programmer is provided on the CD that comes with the S2E RDK and can also be accessed from the website at http://www.luminarymicro.com/products/software_updates.html. The steps to complete the firmware update: 1. Using LM Flash Programmer a. Start the LM Flash Programmer GUI. b. On the Configuration tab, select “Manual Configuration” from the “Quick Set” pull-down menu. November 4, 2009 19 Serial-to-Ethernet Configuration and Firmware Update c. Select the “Ethernet Interface” option from the “Interface” pull-down menu. d. Complete the “Client IP Address” field with the IP address shown on the Firmware Update page. e. Complete the “Client MAC Address” field with the MAC address shown on the Firmware Update page. f. Select the Ethernet Adapter of the PC to use. g. Select to the Program tab. Click the “Browse” button and select the binary file for the updated firmware. 2. Using LM Flash Programmer Click the “Program” button. 3. If after a few seconds the LM Flash Programmer status bar does not indicate that the update is in progress, using the Firmware Update Page, click the "Update" button. 20 November 4, 2009 C H A P T E R 3 Using the S2E Module as a Serial Extender over Ethernet The application that comes preprogrammed into the S2E module is capable of implementing a serial extender over Ethernet using two S2E modules. This scenario is used to connect two serial devices over a network. This can be useful to overcome cable length limitations. Figure 3-1shows a typical situation for doing this. Figure 3-1. Implementing a Serial Extender over Ethernet Power Ethernet Serial Serial-only Device #1 Net work Telnet Data Serial-to-Ethernet Module Power Serial Serial-only Device #2 Serial- to-Ethernet Module Below are the steps for creating a serial extender example. For this example, the two serial devices are two PCs. In addition, the following assumptions are made: the two S2E modules are connected to a network with a DHCP server so an IP address can be automatically acquired, the two S2E modules are connected to the same subnet as a PC that can be used to configure them, the S2E modules have the factory default settings, and that connector board port 0 is the serial port being used for both S2E modules. November 4, 2009 21 Using the S2E Module as a Serial Extender over Ethernet NOTE: In a longer term situation, the two S2E modules would be configured to have static IP addresses since IP addresses can change over time when using DHCP. 1. Connect the serial port of one of the S2E modules to the serial port of a PC. 2. Connect the serial port of the other S2E module to the serial port of another PC. 3. Connect both S2E modules to a network with a DHCP server. 4. Power both S2E modules. 5. After the modules power up, both will automatically be configured as telnet servers by default. One will need to be configured to be a telnet client. Use a PC to double-click on one of the UPnP icons that corresponds to one of the S2E modules. This will load the configuration website for that S2E module. For details on accessing and using the configuration website, see the S2E Configuration and Firmware Update section. 6. Once the configuration page is loaded, click the link for “Port 0 Settings”. 7. Configure the “Telnet Mode” to be “Client”, the “Local Telnet Port Number” and “Remote Telnet Port Number” to be 23, and the “Telnet Server IP” to be the IP address of the other S2E module. 8. Open HyperTerminal on each of the PCs connected to the S2E modules. For each instance of HyperTerminal, select the COM port used by that PC to connect to the S2E module (most likely COM1) and configure it for 115200 bits per second, 8 data bits, no parity, 1 stop bit, and no flow control. 9. Once HyperTerminal is started and configured on each of the PCs, messages can be sent from one PC to the other by simply typing in the HyperTerminal window. Note that the default HyperTerminal settings will not display the typed characters in the transmitting window. 22 November 4, 2009 C H A P T E R 4 Using Serial-to-Ethernet as a Virtual COM Port The S2E module can be configured to appear as a virtual COM port (VCP) on a computer running Windows. VCP software is provided on the RDK Documentation and Software CD. Overview The Virtual COM port (VCP) feature allows legacy software that only supports serial communication to communicate with a serial-only device over Ethernet. Figure 4-1 shows a typical S2E module application. This section describes how to install the VCP software necessary to map the S2E module to a Windows COM port. VCP operation requires two separate applications. The first, com0com creates a virtual COM port pair. Then com2tcp links one half of the virtual COM port pair to the S2E module. The application software (for example, HyperTerminal) connects to the other half of the virtual COM port pair. To easily set-up and configure com0com and com2tcp connections to specific modules, use the LM S2E Configuration application included on the software CD. Figure 4-1. Typical S2E Module Virtual COM Port Power Ethernet Network Ethernet Serial Serial-only Device Telnet Data Serial-to-Ethernet Module Computer with COM0COM and COM2TCP software installed Before configuring VCP please complete all steps in the S2E Quickstart Guide and get familiar with using the web configuration interface. Install com0com Com0com is an open source virtual serial port driver for Windows. Once installed it will configure one or more pairs of virtual COM ports each time Windows starts. 1. Insert the RDK Documentation and Software CD into the CD-ROM drive of your computer. If Autoplay is enabled on your PC, the index.htm file automatically opens in your default web browser. If not, use Windows Explorer or other browser to open the index.htm file manually. 2. From the CD menu, click the Install com0com button; this will start the installation process. If you prefer to manually install com0com, the setup.exe file is located in the /Software/com0com directory. 3. Com0com installation starts with the following dialog. November 4, 2009 23 Using Serial-to-Ethernet as a Virtual COM Port a. Click Next. b. Click I Agree. 24 November 4, 2009 Stellaris® S2E RDK User’s Manual c. Leave the Component setup at the default settings. Click Next. d. Choose the Install Location. Click Install. November 4, 2009 25 Using Serial-to-Ethernet as a Virtual COM Port e. Installation will complete. When installation is done click Next. f. Click Finish. The Windows New Hardware Wizard will now run automatically for each of the two new Virtual COM ports. Please complete the following steps twice. 26 November 4, 2009 Stellaris® S2E RDK User’s Manual g. Windows will detect the new Com port. When the New Hardware Wizard run, select No, not this time and click Next. h. Select Install the software automatically. Click Next. November 4, 2009 27 Using Serial-to-Ethernet as a Virtual COM Port i. When the New Hardware Wizard completes, click Finish. Repeat for the second half of the Virtual Com port pair. Com0com has now created virtual Com ports CNCA0 and CNCB0. These ports will be visible to Windows serial applications such as HyperTerminal. The port names can be change by running the LM S2E Configuration application. For LM S2E Configuration application installation instructions, see “Install LM PC S2E Configuration” on page 28. Install com2tcp Com2tcp is an open-source project used in conjunction with com0com to redirect data traffic from a virtual COM port on the PC to a telnet server or client on the Ethernet network. To install com2tcp: 1. In the RDK documentation and software CD menu, select Install com2tcp. 2. In the Install com2tcp page that appears, right-click com2tcp application. 3. When prompted, select Save Target As and navigate to your selected installation location. It is recommended that you install com2tcp in the same directory as com0com; by default this is C:\Program Files\com0com. Install LM PC S2E Configuration The Serial-to-Ethernet PC Configuration application offers a convenient method of setting up VCP connections to S2E modules. It allows the creation of com0com virtual COM ports and their connection to particular S2E modules using com2tcp. To install the LM S2E Configuration application: 1. In the RDK documentation and software CD menu, select Windows Configuration Utility Download. 2. When the Welcome window appears, click Next. 28 November 4, 2009 Stellaris® S2E RDK User’s Manual 3. In the license agreement window, select I Agree and click Next. 4. In the Installation Options window, selecting Start all connections automatically (recommended) allows the application to automatically start all appropriately configured VCP connections when Windows boots and adds the option “LM S2E Launcher” under All Programs in the Windows Start menu. 5. Click Next. 6. Choose the desired installation location or use the default installation location indicated. Click Next. 7. Click Next to confirm the installation process and start copying application files. 8. When the Installation Complete window appears, click Close. After installation completes, review the options available in your Windows Start menu. You should see the menu group highlighted in Figure 4-2. Figure 4-2. Luminary Micro menu group After selecting Start > All Programs > Luminary Micro > Serial-to-Ethernet Configuration: To start the PC Configuration application, select LM S2E PC Configuration. For instructions on how to do this, see “Configure VCP Using the LM S2E PC Configuration Application” on page 29. To view the application’s help file, select LM S2E PC Configuration Help or press the F1 key while the application is running. To start VCP connections to S2E modules, if not automatically started upon Windows boot (see step 4 of “Install LM PC S2E Configuration”), select the LM S2E Launcher companion application. To search for S2E modules on the network and access their configuration pages, select LM S2E Browser. Configure VCP Using the LM S2E PC Configuration Application The LM S2E Configuration application offers easy creation and modification of VCP connections using a single application. Such connections contain several components: The legacy serial application connects to a virtual COM port on the PC. This port is one of a pair created using com0com. From within the LM S2E Configuration application you can create new port pairs and edit the names of existing ports to cater to serial applications that do not understand the default CNCA/CNCB naming convention used by com0com. The second port in the pair is opened by com2tcp, which creates a telnet connection to the remote S2E module over Ethernet. The Configuration application lists all S2E modules it finds and offers a convenient method for accessing their web-based configuration pages. November 4, 2009 29 Using Serial-to-Ethernet as a Virtual COM Port The S2E module connects to the remote serial device, as shown in Figure 4-3. Figure 4-3. S2E module connection over Ethernet Connection Creation The LM S2E Configuration application gathers the information necessary for creating these connections using com0com and UPnP and then saves entries in the system registry, which are later read by the LM S2E Launcher companion application when it starts the connections. The connections created here assume that the S2E module is running as a telnet server, which is the default for this module. To create a new connection between a virtual COM port on the PC and remote device: 1. Select Start > All Programs > Luminary Micro > Serial-to-Ethernet Configuration > LM S2E PC Configuration. The first time the application starts it ensures that com0com and com2tcp are present. If you did not install these in the default locations, the application prompts you for the location of each. You only have to provide this location information once and will not be reprompted unless you remove one or both packages or move one or both packages to a new location. If one or other of the packages is not installed, the application will continue to run but will offer the, “LM S2E Browser” functionality and not show any com0com/com2tcp options. 2. Once the application locates both the com0com and com2tcp packages, the main application window appears, as shown in Figure 4-4. 30 November 4, 2009 Stellaris® S2E RDK User’s Manual Figure 4-4. Main LM S2E Configuration application window 3. The application performs a UPnP query to discover all S2E modules on the network. Once this query completes, the Serial-to-Ethernet Modules pane of the main application window updates to show a complete list of the modules found. Once this list appears, select the module to which you want to set up a connection. Double-click a module to launch its configuration website. 4. In the com0com Port Pairs pane, click the + to the left of Virtual Port Pair 0 to expand the listing. Select one of the two virtual COM ports listed. This is the port that com2tcp will use in the connection you are configuring. 5. Enter a Connection Name for this connection. 6. Enter the Telnet Server Port Number (TCP/IP port number) for the S2E module and serial port. To find the Telnet Server Port Number, double-click the configuration module’s listing to go to its website. Then, go to the Status & Configuration page and locate the Local Telnet Port Number row, and select the number for the serial connection, Port 0 or Port 1, that you wish to use with this connection. 7. Select Start this connection automatically when Windows starts. This ensures that the LM S2E Launch companion application automatically starts the connection. If you do not select this option, the LM S2E Launcher application does not start the connection even if you run it manually, unless you provide the -a command line option that instructs the launcher to start all connections. 8. Click Create Connection to save the information on the newly configured connection for future use by the LM S2E Launcher. November 4, 2009 31 Using Serial-to-Ethernet as a Virtual COM Port Notice that Virtual Port Pair 0 is no longer bolded, indicating that the port pair is already in use and you cannot configure another connection using the same pair. To create another VCP pair for use by your second (or subsequent) connection, click Create New Pair and repeat the process, beginning with step 4, selecting newly created virtual port pair listing. 9. Select Start > All Programs > Luminary Micro > Serial-to-Ethernet Configuration > LM S2E Launcher. The launcher application reads the connection information you just configured and starts com2tcp to initiate a connection with the desired S2E module. 10. You can now start your legacy serial application and open virtual COM port CNCA0 and communicate with the remote serial device attached to the S2E module. Edit port names Some serial applications are unable to connect to a serial port named using a form other than COMm, where m is the port number. Since com0com ports are named CNCAn and CNCBn by default, this can cause problems. If you encounter this problem, the LM S2E Configuration application allows you to change the names of virtual COM ports, as long as neither port in the pair is currently part of a configured connection. To edit the port name, expand the virtual port pair listing that contains the port you want to change. Double-click the port name, edit the connection name, and press ENTER. Manual VCP Configuration If you do not want to install the LM S2E Configuration application, you can manually configure and start com0com and com2tcp connections. To manually create a virtual port pair, select All Programs > com0com > setup. Once you create a virtual port pair, com2tcp establishes a link between one of the two ports in the pair and the S2E module. You can select either port for use with com2tcp. You must also know the following: The module’s IP address For information on determining the IP address using My Network Places, see the S2E RDK Quickstart document. The module’s telnet port number The default telnet port numbers are 23 and 26. For information on determining the specific telnet port numbers, see the S2E RDK Quickstart document. The process for manual VCP configuration shown here assumes the creation of a com0com port pair with the default name, as occurs with initial installation of the com0com package, and that com2tcp will use CNCB0 and the legacy serial application will use CNCA0. 1. Open a command prompt window; to do this, select Start > All Programs > Accessories > Command Prompt. 2. Change to the installation location for com2tcp. 3. At the command prompt, enter com2tcp --telnet \\.\<CNCB0> <IP address> <telnet port> where – <CNCB0> is the name of the VCP used by com2tcp, for which CNCB0 is the default name 32 November 4, 2009 Stellaris® S2E RDK User’s Manual – <IP address> is the actual S2E IP address; for example, 169.254.5.67 – <telnet port> is the actual telnet port number; for example, 23 For an example of this command string and the module’s response, see Figure 4-5. Figure 4-5. Manual VCP configuration Com0com now has an established link between the S2E module and virtual COM port CNCB0, allowing Windows applications to connect to the S2E module through the virtual COM port CNCA0 (the port used by the legacy serial application). When communication occurs, com2tcp provides status information in the command prompt window, as shown in Figure 4-6. Figure 4-6. Com2tcp communication shown in the command prompt window If you need to end com2tcp, click the command prompt window to be sure it is the active window and press CTRL+C. Verify VCP Operation Connect the S2E hardware (as described in the Quickstart Guide). Open two HyperTerminal windows, one Virtual COM port and one standard COM port, as follows: 1. Open one HyperTerminal window. On Windows XP, HyperTerminal can be found by clicking Start, Programs, Accessories, and then Communications. 2. Enter a name for the terminal window and click OK. 3. In the Connect Using pull-down menu, select the COM port associated with the port that the DB9 cable is connected to on your PC and click OK. 4. Select 115200 for Bits per second, 8 for Data bits, None for Parity, 1 for Stop Bits, and None for Flow Control. 5. Open another HyperTerminal window. 6. Enter a name for the terminal window and click OK. 7. In the Connect Using pull-down menu, select CNCA0. Then click OK. November 4, 2009 33 Using Serial-to-Ethernet as a Virtual COM Port 8. Now you can type in one of the HyperTerminal windows and see the text displayed in the other HyperTerminal window. This demonstrates the S2E module converting serial data to Ethernet and vice versa. Figure 4-7 show the HyperTerminal File Properties Dialog configuration. In this example, the connection was named S2E VCP. Figure 4-7. HyperTerminal File Properties Dialog Com0com and com2tcp are open-source (GPL) projects. For additional information and source code for the com0com and com2tcp, refer to the S2E documentation and source code CD or search the Internet for the respective project name. 34 November 4, 2009 C H A P T E R 5 Hardware Description The Serial-to-Ethernet (S2E) board is a simple add-on product that provides serial UART to Ethernet communications. Existing systems that lack Ethernet connectivity but have a UART port can be easily upgraded by the addition of the S2E module. A simple web server is used for module configuration. The Serial-to-Ethernet Reference Design Kit (RDK) adds a second board (S2E-CKIT) with connectors and cables for easy connection to a PC. All design files are provided on the RDK-S2E CD. Block Diagram Figure 5-1 shows the S2E block diagram. Figure 5-1. Serial-to-Ethernet Block Diagram J1 U1RX 2 1 XV_U0RX U1TX XV_U0TX U1CTS XV_U0CTS U1RTS XV_U0RTS RSTn GND 5V 12 11 PA1 PB0 PB1 3.3V regulator 3.3V GND RSTn U1RX U1TX November 4, 2009 PA0 LM3S6432 Magnetics RST PD2/PA4 PD3/PA5 U1CTS PA3 U1RTS PA2 35 Hardware Description 36 November 4, 2009 A P P E N D I X A Schematics This sections contains the schematic diagram for the S2E Module. Serial-to-Ethernet module on page 38 November 4, 2009 37 Schematic page 1 1 2 3 4 5 6 Revision History Revision Date A Description X0 1/16/2008 First release. X1 1/18/2008 Second release. X2 1/21/2008 Added JTAG pullups. X3 1/25/2008 Added pulldown to U2 pin 1 to enable operation with ICL3223. RA 1/26/2008 Released for manufacturing. RB 2/12/2008 Fixed S1,S2 pads, rotated J3, fixed net names. RC 4/2/2008 Added pulldown resistor to U1-K3, added pullups to U2 to enable transceiver after reset. Renamed GNDPHY (U1-K3) to ERBIAS, fixed termination for ethernet RX signals. Added JTAG test pads. A J1 2 4 6 8 10 12 U1RX_SPIRX U1TX_SPITX U1CTS_SPICLK U1RTS_SPISEL RST_n 1 3 5 7 9 11 XV_U0RX XV_U0TX XV_U0CTS XV_U0RTS 3.3V 5V HDR 2X6-SHRD SYSTEM U1 3.3V 10K 10K 10K 10K J3 1 3 5 7 9 U2 B 13 12 15 10 0.47uF 2 C3 3.3V R17 10K T2IN T2OUT R1OUT R1IN R2OUT R2IN V+ C1- 0.47uF 5 R18 10K T1OUT C1+ 4 C6 T1IN V- C15 0.1uF 17 8 TMS TCK TDO TDI RST_n HDR 2X5-MH JTAG/SWD 16 R1 3 C4 0.47uF 7 C5 0.47uF 0 TP1 TP2 TP3 TP4 TP5 TP6 9 INVALID EN C2- 14 20 11 1 FORCEON FORCEOFF 18 XTALN XTALP 3.3V GND XVR_ON 3.3V XVR_INV_n XVR_EN_n VCC 19 C9 0.47uF ICL3223 ETH_RXIP ETH_RXIN R16 10K A9 B9 B8 A10 L1 M1 M2 L2 A11 B12 B11 A12 D1 D2 C2 C1 C2+ 6 XVR_OFF_n 2 4 6 8 10 OSC0 OSC1 K1 K2 J1 J2 K3 M7 L7 C10 L11 M11 3.3V R7 10K C10 R19 12.4K M10 M12 0.1uF E11 B10 D1 C MBR0520 5V 3.3V RST_n U3 4 R10 10K VIN 1 VOUT 5 C18 0.47uF VR 2 C19 4.7uF GND K11 K12 CD C17 4.7uF 3 Note: ERBIAS resistor R19 required for compatibility with future revisions of the LM3S6432. PQ1N333MASPQ C20 0.47uF Y2 Y1 1 8.000 MHz 25 MHz C33 18pF 2 C34 18pF C35 18pF C36 18pF H11 B6 C4 C5 F10 F11 F12 H3 J3 J10 K5 K6 K10 L10 A5 B5 PA0/U0RX PA1/U0TX PA2/SSI0CLK PA3/SSI0FSS PA4/SSI0RX PA5/SSI0TX PA6/CCP1 PA7 PC0/TCK/SWCLK PC1/TMS/SWDIO PC2/TDI PC3/TDO/SWO PC4 PC5/C1+ PC6/CCP3 PC7 PB0/CCP0 PB1/CCP2 PB2/I2C0SCL PB3/I2C0SDA PB4/C0PB5/C1PB6/C0+ PB7/TRST PD0/PWM0 PD1/PWM1 PD2/U1RX PD3/U1TX PD4 PD5 NC NC PE0 PE1 PE2 PE3 PE4 NC NC NC PF0 PF1 PF2/LED1 PF3/LED0 MDIO TXON TXOP GNDPHY PG0 PG1 XTALNPHY XTALPPHY ERBIAS RXIP RXIN VCC GNDPHY GNDPHY VCCPHY VCCPHY OSC0 OSC1 XOSC0 XOSC1 WAKE HIB CMOD0 CMOD1 RST GND GND GND GND GND GND GND GND GND GND GND GND GND AGND AGND E12 D12 C11 C12 A6 B7 A7 A8 U0CTS U0RTS XVR_INV_n XVR_EN_n XVR_ON XVR_OFF_n G1 G2 H2 H1 E1 E2 F2 F1 3.3V R11 10K 3.3V B U1RX_SPIRX U1TX_SPITX C1 0.1uF R2 10K M9 H12 J11 J12 L9 L8 M8 K4 R3 330 R4 330 R5 49.9 C2 0.01uF R6 49.9 J2 G+ 12 11 MDIO_PU ETH_TXOP 3 ETH_TXON C9 C8 D11 D10 G- 1CT:1 TX+ 1 TX- 2 5 C7 10pF RX+ 3 4 C8 10pF 4 7 ETH_RXIP ETH_RXIN 5 RX- 6 1CT:1 7 6 8 8 ADC0 ADC1 ADC2 ADC3 ADC4 ADC5 ADC6 ADC7 LDO VDD33 VDD33 VDD33 VDD33 VDD33 VDD33 VDD33 VDD33 VBAT VDD25 VDD25 VDD25 VDD25 VDDA VDDA B1 A1 B3 B2 A2 A3 B4 A4 ETH_LED0 ETH_LED1 R8 49.9 E3 LDO C11 10pF R9 49.9 C12 10pF 2 1 Y- 9 10 NC Y+ GND PulseJack_RJ45_SMT Ethernet 10/100 3.3V C13 0.1uF E10 G10 G11 G12 H10 K7 K8 K9 GL GR R12 R13 R14 R15 L3 M3 M4 L4 L5 M5 L6 M6 U0RX U0TX U1RTS_SPISEL U1CTS_SPICLK U1RX_SPIRX U1TX_SPITX C14 0.01uF C S1 S2 L12 C3 D3 F3 G3 C6 C7 C22 0.1uF C23 0.1uF C24 0.1uF C21 1uF C28 0.1uF C29 0.01uF C30 0.01uF C27 1uF SMT_RA_M3 SMT_RA_M3 FB1 40 ohm@100MHz_1.5A LM3S6432 C42 0.1uF Fiducials FID1 40 Mil Pad 80 Mil Mask FID2 40 Mil Pad 80 Mil Mask FID3 40 Mil Pad 80 Mil Mask FID4 40 Mil Pad 80 Mil Mask C43 0.1uF C38 0.1uF C39 0.1uF C40 0.1uF C37 1uF C41 0.01uF FID5 40 Mil Pad 80 Mil Mask Texas Instruments D FID7 40 Mil Pad 80 Mil Mask FID8 40 Mil Pad 80 Mil Mask This document contains information proprietary to Texas Instruments, Inc. and shall not be used for engineering design, procurement of manufacture in whole or in part without the express written permission of Texas Instruments. Copyright © 2007 Texas Instruments, Inc. All rights reserved. Designer: Bottom Arnaldo Cruz Drawn by: Arnaldo Cruz Approved: * Drawing Title: SERIAL2ENET Module Page Title: FURY BGA108, UART Transceiver, RJ45 with Magnetics Size 2 3 4 5 Document Number: C Date: 1 D 108 Wild Basin Rd. Two Wild Basin Suite 350 Austin, TX 78746 Top FID6 40 Mil Pad 80 Mil Mask Rev 0001 4/25/2008 RC Sheet 6 1 of 1 A P P E N D I X B Bill of Materials (BOM) Table B-1 provides the BOM for the Serial-to-Ethernet RDK and Table B-2 provides the BOM for the Serial-to-Ethernet connector board. Table B-1. Serial-to-Ethernet Bill-of-Materials Designator Comment Description Footprint MFG Ordering Qty C1, C10, C13, C15, C22, C23, C24, C28, C38, C39, C40, C42, C43 0.1uF 1005[0402] MURATA GCM155R71C104KA 55D 13 C2, C14, C29, C30, C41 0.01uF 1005[0402] MURATA GRM155R71E103KA 01D 5 C3, C4, C5, C6, C9, C20 0.47uF CAP, 0603, 0.47uF, 10%, 16V, X7R 1608[0603] Murata GRM188R71C474KA 88D 6 C7, C8, C11, C12 10pF CAP, 0603, 10 pF, 10%, 25V, COG 1608[0603] AVX 06033A100KAT2A 4 C17, C19 4.7uF CAP, 0805, X7R, 4.7uF, 20%, 10V C0805 Murata GRM21BR61A475M A73L 2 C21, C27, C37 1uF CAP, 0805, X7R, 1uF, 10%, 10V C0805 Murata GRM21BR71A105KA 01L 3 C33, C34, C35, C36 18pF CAP, 0402, C0G, 18pF, 50V 1005[0402] MURATA GRM1555C1H180JZ 01D 4 D1 MBR0520 DIODE SCHOTTKY 0.5A 20V SOD-123 Fairchild Semiconductor MBR0520L 1 J1 HDR 2X6SHRD HDR, SHROUDED 2x6, 2mm CTR HDR2X6 - 2mm Hirose Electric Co DF11-12DP2DSA(24) 1 J2 PulseJack_RJ 45_SMT PulseJack RJ45 with XFMR 1CT:1, TX, RX SMT RJ45-SMT-J30 Pulse Engineering J3011G21DNL 1 J3 HDR 2x5-MH MICRO HDR, 2x5, 0.050" CTR HDR 2x5_SHRD_.050 HARWIN M50-3500542 1 R2, R7, R10, R16 10K RES, SO, 0603, 10K, 1%, 1/10W J1-0603 Vishay/Dale CRCW060310K0FKE A 4 R3, R4 330 RES, SO, 0603, 330 Ohm, 1%, 1/10W J1-0603 Vishay/Dale CRCW0603330RFK EA 2 R5, R6, R8, R9 49.9 RES, SO, 0603, 49.9, 1%, 1/10W J1-0603 Vishay/Dale CRCW060349R9FK EA 4 November 4, 2009 39 Table B-1. Serial-to-Ethernet Bill-of-Materials (Continued) Designator Comment Description Footprint MFG Ordering Qty S1, S2 SMT_RA_M3 SMT right angle fastener, M3 thread SMT_RA_M3 Penn Engineering & Manufacturing (PEM) SMTRAM3-7-5ET 2 U1 ARM Cortex M3 Microcontrolle r ARM Cortex-M3 Microcontroller BGA108C80P12X12_ 1000X1000X150 Texas Instruments LM3S6432-IBZ50 1 U2 ICL3223 RS-232 Transceiver, 2 TX, 2 RX, 250Kbit SSOP-20 Intersil ICL3223ECAZ 1 U3 PQ1N333MA SPQ IC, 350mA LDO regulator SOT89-5 Sharp Microelectronics PQ1N333MASPQ 1 Y1 8.000 MHz XTAL 8.000MHz Crystal_NX8045 NDK NX8045GB8.000000MHZ 1 Y2 25 MHz XTAL 25MHz SMT, 50ppm Crystal_NX5032 NDK NX5032GA25.000000MHZ 1 Table B-2. Serial-to-Ethernet Connector Board Bill-of-Materials Designator Comment Description D1 GREEN_LED LED GREEN SGL 20mA TH LED-T1-3mm KINGBRIGHT WP132XGD 1 J1 SKT 2X62mm SKT 2x6, 2mm CTR SKT2X6 - 2mm Hirose Electric Co DF11-12DS-2DSA 1 J2 HDR 1X6 HDR, 1x6 0.025" PIN, 0.1" CTR HDR1X6 Molex 22-28-4063 1 J3 HDR 1X2 HDR, 2x1, 0.025" PIN, 0.1" CTR HDR1X2 Molex 22-28-4023 1 J4 DB9_F DB9_F DB9[47X70]-FEMALE Tyco Electronics/ AMP 5747844-4 1 J5 USB Mini AB Socket CONN USB Min-AB Socket through hole USB-miniAB Molex 56579-0519 1 R1 330 RES, SO, 0603, 330 Ohm, 1%, 1/4W AXIAL-0.4 KOA/Speer MF1/4DCT52R3300F 1 40 Footprint MFG Ordering Qty November 4, 2009 IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed. TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards. TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional restrictions. Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would reasonably be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governing such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications, and acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their products and any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support that may be provided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products in such safety-critical applications. TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designated products in automotive applications, TI will not be responsible for any failure to meet such requirements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions: Products Amplifiers Data Converters DLP® Products DSP Clocks and Timers Interface Logic Power Mgmt Microcontrollers RFID RF/IF and ZigBee® Solutions amplifier.ti.com dataconverter.ti.com www.dlp.com dsp.ti.com www.ti.com/clocks interface.ti.com logic.ti.com power.ti.com microcontroller.ti.com www.ti-rfid.com www.ti.com/lprf Applications Audio Automotive Broadband Digital Control Medical Military Optical Networking Security Telephony Video & Imaging Wireless www.ti.com/audio www.ti.com/automotive www.ti.com/broadband www.ti.com/digitalcontrol www.ti.com/medical www.ti.com/military www.ti.com/opticalnetwork www.ti.com/security www.ti.com/telephony www.ti.com/video www.ti.com/wireless Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright © 2009, Texas Instruments Incorporated