Serial-to-Ethernet Converter for Stellaris Microcontrollers

Similar documents
Serial to Ethernet Converter

ADC Oversampling Techniques for Stellaris Family Microcontrollers

EKK-LM3S811 QUICKSTART

Intel Desktop Board DZ68DB

INTEL PERCEPTUAL COMPUTING SDK. How To Use the Privacy Notification Tool

Migration Guide: Numonyx StrataFlash Embedded Memory (P30) to Numonyx StrataFlash Embedded Memory (P33)

LED Manager for Intel NUC

IEEE1588 Frequently Asked Questions (FAQs)

Device Firmware Update (DFU) for Windows

Intel G31/P31 Express Chipset

How to Create a.cibd File from Mentor Xpedition for HLDRC

Intel 848P Chipset. Specification Update. Intel 82848P Memory Controller Hub (MCH) August 2003

How to Create a.cibd/.cce File from Mentor Xpedition for HLDRC

Intel Desktop Board DG41CN

Intel Cache Acceleration Software for Windows* Workstation

Intel Desktop Board D945GCLF2

Upgrading Intel Server Board Set SE8500HW4 to Support Intel Xeon Processors 7000 Sequence

Intel Desktop Board DG31PR

Intel Desktop Board DP67DE

Intel Desktop Board D945GCCR

Intel Desktop Board D945GCLF

Intel Desktop Board DH61SA

Intel 945(GM/GME)/915(GM/GME)/ 855(GM/GME)/852(GM/GME) Chipsets VGA Port Always Enabled Hardware Workaround

USER GUIDE EDBG. Description

Intel Desktop Board D946GZAB

Intel Desktop Board D975XBX2

Innovating and Integrating for Communications and Storage

Software Evaluation Guide for ImTOO* YouTube* to ipod* Converter Downloading YouTube videos to your ipod

Intel Atom Processor E3800 Product Family Development Kit Based on Intel Intelligent System Extended (ISX) Form Factor Reference Design

Intel IXP400 Software Version 1.5

Installation Guide and Release Notes

Drive Recovery Panel

Intel Desktop Board DG41RQ

Intel Desktop Board DH55TC

QUICKSTART CODE COMPOSER STUDIO Stellaris Development and Evaluation Kits for Code Composer Studio

Intel Desktop Board DH61CR

With the standalone CD, follow the installer dialog.

Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing

Intel 82580EB/82580DB GbE Controller Feature Software Support. LAN Access Division (LAD)

Installation Guide and Release Notes

Non-Volatile Memory Cache Enhancements: Turbo-Charging Client Platform Performance

Software Evaluation Guide for WinZip 15.5*

Embedded and Communications Group January 2010

Understanding Windows To Go

OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing

Intel RealSense Depth Module D400 Series Software Calibration Tool

Evolving Small Cells. Udayan Mukherjee Senior Principal Engineer and Director (Wireless Infrastructure)

Intel Desktop Board DP55SB

Mobile Intel Pentium 4 Processor-M and Intel 852PM/GME/GMV Chipset Platform

THIS SPEC IS OBSOLETE

Intel Desktop Board D845PT Specification Update

The Intel Processor Diagnostic Tool Release Notes

Intel vpro Technology Virtual Seminar 2010

Forging a Future in Memory: New Technologies, New Markets, New Applications. Ed Doller Chief Technology Officer

OLED display with pixels resolution Ambient light sensor CPU load Analog filter Quadrature Encoder with push button Digital I/O

Intel Extreme Memory Profile (Intel XMP) DDR3 Technology

Intel vpro Technology Virtual Seminar 2010

EDBG. Description. Programmers and Debuggers USER GUIDE

AN976: CP2101/2/3/4/9 to CP2102N Porting Guide

Intel Cache Acceleration Software - Workstation

Intel Parallel Studio XE 2011 for Windows* Installation Guide and Release Notes

Theory and Practice of the Low-Power SATA Spec DevSleep

Intel Desktop Board DQ57TM

Apollo2 EVB Quick Start Guide

Intel Desktop Board DQ35JO

Enhanced Serial Peripheral Interface (espi) ECN

ETHERNET_FLASH_LOADER

Intel Learning Series Developer Program Self Verification Program. Process Document

Installation Guide and Release Notes

Intel Server Board S2600CW2S

Intel X48 Express Chipset Memory Controller Hub (MCH)

Software Evaluation Guide for WinZip* esources-performance-documents.html

Boot Agent Application Notes for BIOS Engineers

SAMSUNG ELECTRONICS RESERVES THE RIGHT TO CHANGE PRODUCTS, INFORMATION AND SPECIFICATIONS WITHOUT NOTICE. Products and specifications discussed

Intel IXP400 Digital Signal Processing (DSP) Software: Priority Setting for 10 ms Real Time Task

Intel USB 3.0 extensible Host Controller Driver

Intel Parallel Studio XE 2015 Composer Edition for Linux* Installation Guide and Release Notes

2013 Intel Corporation

Intel Stereo 3D SDK Developer s Guide. Alpha Release

Multifunction Serial Interface (PDL_MFS) Features. General Description. When to Use a PDL_MFS Component. Quick Start 1.0

Intel RealSense D400 Series Calibration Tools and API Release Notes

Intel Atom Processor D2000 Series and N2000 Series Embedded Application Power Guideline Addendum January 2012

Intel 6400/6402 Advanced Memory Buffer

Intel Integrated Native Developer Experience 2015 (OS X* host)

AT03975: Getting Started with SAM L21. Descripton. Features. SMART ARM-Based Microcontroller APPLICATION NOTE

Computer Management* (IEA) Training Foils

Software Evaluation Guide for Photodex* ProShow Gold* 3.2

Intel Desktop Board D102GGC2 Specification Update

Intel Atom Processor E6xx Series Embedded Application Power Guideline Addendum January 2012

Intel Desktop Board DP45SG

Intel Desktop Board D945GSEJT

Enabling DDR2 16-Bit Mode on Intel IXP43X Product Line of Network Processors

Intel & Lustre: LUG Micah Bhakti

QSG123: CP2102N Evaluation Kit Quick- Start Guide

Intel Server Board S2400SC

Mini Gateway Ethernet for ModFLEX Wireless Networks

Software Evaluation Guide for CyberLink MediaEspresso *

Intel Integrated Native Developer Experience 2015 Build Edition for OS X* Installation Guide and Release Notes

AT06467: Getting started with SAM D09/D10/D11. Features. Description. SMART ARM-based Microcontrollers APPLICATION NOTE

March Getting Started with the Intel Desktop Board DQ77MK UEFI Development Kit

Transcription:

Serial-to- Converter for Stellaris Microcontrollers APPLICATION NOTE AN01266-00 Copyright 2008 Luminary Micro, Inc.

Legal Disclaimers and Trademark Information INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH LUMINARY MICRO PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN LUMINARY MICRO S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, LUMINARY MICRO ASSUMES NO LIABILITY WHATSOEVER, AND LUMINARY MICRO DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF LUMINARY MICRO S PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. LUMINARY MICRO S PRODUCTS ARE NOT INTENDED FOR USE IN MEDICAL, LIFE SAVING, OR LIFE-SUSTAINING APPLICATIONS. Luminary Micro may make changes to specifications and product descriptions at any time, without notice. Contact your local Luminary Micro sales office or your distributor to obtain the latest specifications before placing your product order. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Luminary Micro reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. Copyright 2008 Luminary Micro, Inc. All rights reserved. Stellaris, Luminary Micro, and the Luminary Micro logo are registered trademarks of Luminary Micro, Inc. or its subsidiaries in the United States and other countries. 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. Luminary Micro, Inc. 108 Wild Basin, Suite 350 Austin, TX 78746 Main: +1-512-279-8800 Fax: +1-512-279-8879 http://www.luminarymicro.com January 24, 2008 2

Table of Contents Introduction... 2 Accessing a Serial Port over the... 2 Software Features and Configuration... 3 Accessing an -Based Serial Port as a Legacy Serial Port... 3 Conclusion... 4 References... 4 January 24, 2008 1

Introduction When a legacy product only contains a serial port for a configuration or control interface, continuing to access the legacy product through the serial interface can become challenging over time. Newer computers, especially laptop computers, do not necessarily have serial ports, and a serial connection is limited by cable length (typically 10 m). Using in place of the serial port provides many benefits: is a more common interface available on computing equipment. The legacy product can be more easily shared (instead of changing a cable connection, a new connection over the existing network is made). 10 m cable length is no longer an issue (subject to tolerance of the increased transmission delay if the two pieces of equipment are separated by several routers, or are located on a heavily loaded network segment). The software described in this application note allows an -enabled Stellaris microcontroller to be used as a serial-to- converter. By placing a serial-to- converter on the serial port of a legacy product, it can be given the ability to operate on the without having to make any changes to it. This is especially useful when the legacy product is not able to be modified (such as in the case of third-party products). Accessing a Serial Port over the In order to access a serial port over the, a network protocol must be used to formulate the traffic on the. The most commonly used protocol for accessing serial ports is the telnet protocol, which is described by RFC 854 - Telnet Protocol Specification. While originally defined for an interactive login on a remote system, the telnet protocol can also be used to access a remote serial port. After a telnet connection is made to the converter, all data received from the serial port is sent over the connection, and all data received from the connection is sent to the serial port. With this mirroring of data between the serial port and the telnet connection, the telnet connection becomes an extension of the serial port. An extension to the telnet protocol, described by RFC 2217 - Telnet Com Port Control Option, allows the configuration of the serial port to be controlled over the telnet connection. Figure 1 shows a client network node using the serial-to- converter to access the serial port on a legacy product. Figure 1. Serial Port Access on Legacy Product Client Serial-to- Converter RS-232 Legacy Product Telnet January 24, 2008 2

Software Features and Configuration The serial-to- converter software provides basic telnet access to a UART0 on the Stellaris microcontroller; no RFC 2217 configuration of the UART is available. The configuration of the application is performed at compile time and can not be changed at run time. The lwip TCP/IP stack that is provided as part of the Stellaris Peripheral Driver Library is used to implement a telnet server that accepts a single connection on TCP port 23, the standard telnet port. The converter software can be configured to use a static IP configuration or DHCP. When using a static IP configuration, the IP address, netmask, and default gateway can all be statically defined. When using DHCP, these values are retrieved from the DHCP server. Effective use of DHCP does require an automatic reservation be provided in the DHCP server so that the converter receives the same IP address each time; otherwise, the converter may get a different IP address each time it is started. The TCP port used for the telnet server can be configured, along with the number of seconds to wait before an idle connection is dropped. The default TCP port to use is 23, which is the standard telnet port. The idle connection time-out defaults to 0, which disables the feature. When the idle connection time-out is enabled, the telnet connection will be dropped after a period of inactivity. The configuration of the UART is also configured at compile time. Any baud rate supported by the UART can be used, with the device clocking supporting up to 3.125 Mbaud operation. The number of data bits, stop bits, and parity can also be set. Configuration of the serial-to- converter is through the config.h file, which contains a set of #define literals that enable or provide configuration values for features in the software. By changing the contents of this file and re-building the application, a new configuration of the converter can be generated. The complete source code for the serial-to- converter is provided in an accompanying zip file. It should be extracted to the same directory that the Stellaris Peripheral Driver Library was extracted in order to build it. The code will be extracted into the DriverLib/AppNotes/an01266 directory and is built like any other example application from the library (using either make from the command line or the project file for either Keil uvision or IAR Embedded Workbench). The application will run on the EK-LM3S6965 and EK-LM3S8962 evaluation boards (although the serial port that is made available over is the one connected to the PC over the USB port). Accessing an -Based Serial Port as a Legacy Serial Port In some situations, the legacy product consists of more than just the piece of hardware with a serial port; it may be paired with software on a computer that uses the serial port to configure and control the product. It may not be possible to change this software either, so the legacy product will not be able to make the required telnet connection to use the -based serial port. The solution for this problem is a COM port redirector, also known as a virtual COM port. A COM port redirector creates a virtual device within the operating system of the computer that appears to applications as if it were a real COM port. Instead of sending the stream of characters to a real serial port on the computer, the COM port redirector instead sends that stream to a different location. A common use of COM port redirectors is for USB-based serial ports (such as the January 24, 2008 3

USB-based serial port found on the Stellaris evaluation boards). Alternatively, a COM port redirector can use the telnet protocol to connect a virtual COM port on the host computer to the serial-to- converter connected to the legacy device. Figure 2 shows an application on Windows using a COM port redirector to connect to the serial-to- converter to access the serial port on a legacy product. Figure 2. Legacy Application COM7 COM Port Redirector Telnet Serial-to- Converter RS-232 Legacy Product The com0com project, and specifically the com2tcp sub-project, is an open-source project that can be used to provide an appropriate COM port redirector in Windows for use with the serial-to- converter. See the com0com web site for details on how to configure and use that software. Other applications, both open and commercial, are available to provide similar functionality. Conclusion Through the use of the telnet protocol, a serial port can be easily accessed over the using a Stellaris microcontroller. The fully-integrated controller in the Stellaris microcontroller enables the design of a very small board for retrofitting a legacy product with accessibility. If more functionality is required of that network node, plenty of Stellaris flash space and processing power remains to perform additional tasks. References The following documents and source code are available for download at www.luminarymicro.com: Stellaris LM3Snnnn microcontroller data sheet, (where nnnn is the device number) Publication Number DS-LM3Snnnn Stellaris Peripheral Driver Library User's Guide, Publication Number PDL-LM3S-UG Stellaris Peripheral Driver Library, Order Number PDL-LM3S January 24, 2008 4

Serial-to- Converter Software, Order Number SW01266 (includes Serial-to- Converter Software Reference Manual) The following documents are available for download at the given web address: RFC 854 - Telnet Protocol Specification: http://tools.ietf.org/html/rfc854 RFC 2217 - Telnet Com Port Control Option: http://tools.ietf.org/html/rfc2217 The com2com project: http://com0com.sourceforge.net Company Information Luminary Micro, Inc. designs, markets, and sells ARM Cortex-M3-based microcontrollers (MCUs). Austin, Texas-based Luminary Micro is the lead partner for the Cortex-M3 processor, delivering the world's first silicon implementation of the Cortex-M3 processor. Luminary Micro's introduction of the Stellaris family of products provides 32-bit performance for the same price as current 8- and 16-bit microcontroller designs. With entry-level pricing at $1.00 for an ARM technology-based MCU, Luminary Micro's Stellaris product line allows for standardization that eliminates future architectural upgrades or software tool changes. Luminary Micro, Inc. 108 Wild Basin, Suite 350 Austin, TX 78746 Main: +1-512-279-8800 Fax: +1-512-279-8879 http://www.luminarymicro.com Support Information For support on Luminary Micro products, contact: support@luminarymicro.com +1-512-279-8800, ext. 3 January 24, 2008 5