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:

Rugged combo antennas cut multi-network installations down to one
iCorp Technologies Computer/Embedded Technology
Quectel Wireless Solutions has expanded its antenna portfolio with four rugged multi-network combo antennas.

Read more...
Intelligent video processing
Rugged Interconnect Technologies Computer/Embedded Technology
The CHARM150AGX is based on a NVIDIA AGX Orin embedded processor, which incorporates a multicore ARM processor and powerful AI/ML accelerator.

Read more...
Quectel’s single-board computers put industrial edge computing on one PCB
iCorp Technologies Computer/Embedded Technology
Quectel Pi series of single-board computers (SBCs), designed for a broad range of industrial applications, include three compact development platforms – the Quectel Pi M1, L1, and H1 boards.

Read more...
GigaDevice expands optical communication portfolio
NuVision Electronics Telecoms, Datacoms, Wireless, IoT
GigaDevice has introduced the new GD32E512 and GD32E252 series MCUs specifically designed for optical module applications.

Read more...
Nordic expands nRF Cloud with firmware vulnerability scanning
RF Design Computer/Embedded Technology
nRF Cloud identifies vulnerabilities in firmware and shows exactly which deployed devices are affected, empowering device manufacturers to address EU Cyber Resilience Act requirements.

Read more...
Arrival of the Epic-PTH9
Vepac Electronics Computer/Embedded Technology
AAEON introduces the EPIC-PTH9, a compact 4-inch industrial single-board computer powered by Intel Core Ultra Series 3 (formerly Panther Lake) processors.

Read more...
EPS-9600 Managed Layer 3 Ethernet Switch with next-generation Time- Sensitive Networking
Electronic Products Design Computer/Embedded Technology
Diamond Systems has introduced EPS-9610 (part of the EPS-9600 family), a rugged, ultra-compact embedded Ethernet switch which integrates military-grade ruggedness with next-generation Time-Sensitive Networking (TSN) capabilities.

Read more...
An industry-first Android 16 smart module solution
RF Design Computer/Embedded Technology Telecoms, Datacoms, Wireless, IoT
The MeiG Smart SLM580 4G Smart Module features native support for Android 16 and covers core frequency bands in major countries and regions worldwide.

Read more...
Accelerate STM32-based IoT development with SPI EEPROM board
Altron Arrow Computer/Embedded Technology
ST Microelectronics’ ready-to-use STM32 expansion board helps design more efficient battery-friendly IoT devices based on ultra low power 32-Mbit Page.

Read more...
Unleash the next generation of Intel Core power
Vepac Electronics Computer/Embedded Technology
The EPIC-BTS9 from AAEON, is tailor-made to bring unprecedented performance to smart manufacturing and industrial robotics.

Read more...









While every effort has been made to ensure the accuracy of the information contained herein, the publisher and its agents cannot be held responsible for any errors contained, or any loss incurred as a result. Articles published do not necessarily reflect the views of the publishers. The editor reserves the right to alter or cut copy. Articles submitted are deemed to have been cleared for publication. Advertisements and company contact details are published as provided by the advertiser. Technews Publishing (Pty) Ltd cannot be held responsible for the accuracy or veracity of supplied material.




© Technews Publishing (Pty) Ltd | All Rights Reserved