Computer/Embedded Technology


Integrating Web servers in embedded applications

17 October 2007 Computer/Embedded Technology

The Web browser has had a profound positive effect at raising consumer expectations in terms of how quickly and easily information can be made available from virtually anywhere in the world. While Web browser technology and usage models have literally saturated the consumer market segments, the fundamental values of what caused worldwide adoption of Web browsers, such as simple user interface, accessibility to remote content, and speed, are actively advancing applications far from consumer segments, such as factory automation, building control, data transaction and the medical field.

The idea of a Web browser to monitor and control embedded applications is not a new concept, but the high cost of overhauling a legacy system with capable technology has stunted embedded adoption. Fortunately, as Moore's Law yields yet again, lithography generation and transistor realty has finally reached a point where a given technology is affordable. Now, with a fundamental understanding of how a Web server is expected to perform in a given application, along with knowledge of integral hardware and software pieces required to complete a cost- and feature-effective Web server system, high-performance Web server capability is easily within reach for embedded designers.

Implementation

A Web server consists of three components: hardware, software and content. The hardware component of a Web server can be implemented with a solution as simple as an Ethernet-enabled microcontroller and an RJ45 connector with integrated magnetics. The microcontroller provides a glueless interface to the most popular implementation - twisted pair wiring. The processor integrated into the microcontroller provides the necessary processing performance to provide Web services while also processing the application and interfaced devices.

The necessary software to implement a Web server is available from many sources. Two popular solutions are the freely available open source lwIP and uIP TCP/IP stacks. Fitting into small memory footprints, these stacks enable network connectivity for the embedded world. Available embedded Web server applications sit on top of these stacks and are used to send and receive the appropriate data.

The simplest Web server stores the Web page content in local memory as static pages. In this case, any request from a client will always result in the client receiving the page as it is stored at the server. To make the Web server less static in terms of what the server provides the client, an enhancement called common gateway interface (CGI) is often used. CGI adds the capability of dynamic Web page content, which allows alteration of information provided by the Web server, inserting new timely information before being sent to the remote client. Dynamic Web page creation can be implemented by the addition of a function call to a compiled program or script running on the server. This called program or script generates an image of any current data and passes that information into the stream of HTML data to be assembled as a Web page by the client.

Design considerations for a hardwired network interface

In order to connect to the Internet, a Web server design requires four main pieces of hardware: the media access controller (MAC), the network physical interface device (PHY), isolating magnetics, and the physical jack that connects to the network system (RJ45) over copper or fibre media. A solution such as Luminary Micro's Stellaris microcontroller integrates both MAC and PHY as shown in Figure 1, which also displays the high-level hardware diagram of a hardwired Ethernet interface. The MAC layer provides transmit and receive processing for Ethernet frames. The MAC layer also provides the interface to the PHY module via an internal media independent interface (MII). The PHY is the interface to the network, including the ability to scramble/descramble incoming and outgoing Ethernet packets. For an effective Ethernet-connected embedded system, the PHY should ideally interface to Category-5 unshielded twisted pair (Cat-5 UTP) cabling for 100BASE-TX applications and Category-3 unshielded twisted pair (Cat-3 UTP) for 10BASE-T applications.

Figure 1.  Ethernet implementation with an ARM Cortex-M3 core
Figure 1. Ethernet implementation with an ARM Cortex-M3 core

Consideration 1: Find a microcontroller that integrates both MAC and PHY on-chip

Although there are numerous microcontroller options that offer an on-chip Ethernet MAC, there are few that offer the combination of both MAC and PHY on a single device. However, the integration of both MAC and PHY works to the advantage of the embedded platform designer, since the on-chip combination has the potential to save significant BOM cost through consolidation of functionality and reduction in footprint, not to mention manufacturing savings in reduced stocking charges and reduced waste from multichip losses. In addition, microcontrollers that integrate both MAC and PHY ensure a reliable Ethernet system. For instance, designers may encounter difficulty with an implementation of a standalone PHY, where the lack of adequate design guidance by the supplier of the PHY can result in a non-functional or impaired design. Tested and qualified components that are known to interoperate with the PHY are critical. Therefore, using a microcontroller with integrated MAC and PHY already accounts for these concerns.

Consideration 2: Find a microcontroller with ample on-chip memory

There are many documented instances of Web server technology downsized for use on platforms with tiny memory complements. Single-chip microcontrollers typically provide only minimal non-volatile storage for use by communication programming. Designs using microcontrollers tend to implement serial interface memories, making available additional bulk memory needed for storage of the static data making up a Web page (HTML). Besides increasing system cost with the serial memory, the delays caused by serial transfer of data from the serial memory make delivery of any Web page lethargic. The overhead of serial memory transfers introduces processing delays into the platform's main application program, thus slowing overall system performance. Solutions using serial memories tend to be static Web page displays or pages that present extremely limited dynamic information. Therefore, a microcontroller should be identified that features enough fast on-chip Flash memory to store and serve the Web content.

Consideration 3: Find a microcontroller with sufficient performance

Many embedded Ethernet-enabled systems need to not only handle network communication, but also be able to run a complex primary application at the same time. The microcontroller needs to have the necessary overall performance to handle interleaving the network communication and application. Choosing a 32-bit microcontroller is critical to achieving the performance needed to handle these applications. Other performance considerations include fast memory and interrupt processing. On-chip single-cycle Flash and SRAM increase performance by minimising the processor overhead due to memory accesses. Microcontrollers with a low latency interrupt controller reduce the overhead incurred each time an interrupt is received, which is critical for a system that will be multitasking.

Consideration 4: Find a microcontroller vendor that offers a complete Web server solution

To quickly get a final product to market, embedded engineers need to work with a microcontroller vendor that offers a complete example Web server solution, including all the hardware and software necessary to begin development. A complete example Web server solution should include cost-effective hardware, a Web server demonstration that runs out-of-the-box, necessary software tools, documentation, a quickstart guide, a working driver library and example source code. In addition, the vendor should offer application notes and excellent applications support. This way, embedded engineers can begin designs with the confidence of knowing that they are starting from a robust Web server example.

A highly integrated Web server solution

Luminary Micro's Ethernet-enabled Stellaris microcontrollers integrate peripherals that are designed for meticulous motion control, meaning that a Stellaris microcontroller is concurrently capable of serving a Web browser while driving a mission-critical motor. To simplify Web server implementation on these microcontrollers, Luminary offers three versions of an Ethernet evaluation kit, each including complete Web server demonstrations using both the uIP and lwIP TCP/IP open source Ethernet protocol stacks, as well as all the hardware, software, peripheral drivers, development tools and documentation needed. Utilising the benefits of this evaluation kit and realising the unique advantages that Stellaris technology offers to a Web server application enables embedded designers to provide effective Web server products with fast time-to-market.



Credit(s)



Share this article:
Share via emailShare via LinkedInPrint this page

Further reading:

Generate waveforms at 10 GS/s
Vepac Electronics Computer/Embedded Technology
New flagship arbitrary waveform generator cards from Spectrum Instrumentation generate waveforms with 2,5 GHz bandwidth and 16-bit vertical resolution.

Read more...
Quad-port 10GBASE-T controller
Rugged Interconnect Technologies Computer/Embedded Technology
he SN4-DJEMBE, available from Rugged Interconnect, is a networking adaptor card for CompactPCI Serial systems, equipped with four individual controllers for 10GBASE-T.

Read more...
HPE policy management platform
Computer/Embedded Technology
Duxbury Networking has announced the availability of the HPE Aruba ClearPass policy management platform, that enables business and personal devices to connect to an organisational level, in compliance with corporate security policies.

Read more...
IoT gateways
Brandwagon Distribution Computer/Embedded Technology
IoT Gateways are hardware and software devices that are responsible for collecting data from connected devices, managing communication between devices and the cloud, and processing and analysing the data before sending it to the cloud for further analysis.

Read more...
1.6T Ethernet IP solution to drive AI and hyperscale data centre chips
Computer/Embedded Technology
As artificial intelligence (AI) workloads continue to grow exponentially, and hyperscale data centres become the backbone of our digital infrastructure, the need for faster and more efficient communication technologies becomes imperative. 1.6T Ethernet will rapidly be replacing 400G and 800G Ethernet as the backbone of hyperscale data centres.

Read more...
Keeping it cool within the edge data centre
Computer/Embedded Technology
The creation of more data brings with it the corresponding need for more compute power and more data centres, which, in turn, can create unique challenges with regards to securing the environment and cooling the IT loads.

Read more...
NEX XON becomes Fortinet partner
NEC XON Computer/Embedded Technology
This designation demonstrates NEC XON’s ability to expertly deploy, operate, and maintain its own end-to-end security solutions, helping organisations to achieve digital acceleration.

Read more...
Online tool for data centre planning and design
Computer/Embedded Technology
Vertiv has unveiled a new tool, Vertiv Modular Designer Lite, designed to transform and simplify the configuration of prefabricated modular (PFM) data centres.

Read more...
Mission computer for HADES
Rugged Interconnect Technologies Computer/Embedded Technology
North Atlantic Industries’ latest product, the SIU34S, has been selected as the mission computer for the High Accuracy Detection and Exploitation System (HADES) program.

Read more...
14th Gen power to boost AI at the edge
Rugged Interconnect Technologies Computer/Embedded Technology
ADLINK’s inclusion of Intel’s 14th generation Core processors into its latest embedded boards and fanless computers is set to boost the AI and graphics capabilities.

Read more...