USB port to find a new home, settled in the embedded system

Anyone who has installed a PC knows that the Universal Serial Interface (USB) has similar performance to Plug and Play. Thus, porting a USB port to an embedded system is a convenient way to control an external device. After all, USB has only two signal lines and two power cables. Designing a USB port will not be difficult. This task is simple to say and has many difficulties for designers. However, the vendor can provide everything from the board to the software.

The easiest way to add a USB port on an embedded system is to use a Windows- based computer. Many single board machines ( Figure 1) offer a built-in USB port and run Windows software. Many USB peripherals are equipped with off-the-shelf Windows drivers. When you need to use a real-time operating system (RTOS) , tasks become difficult. Several companies offer chips and software that simplify USB port design, as well as intellectual property (IP) licenses for adding ports to system-on-chip .

USB devices can play the dual role of a master or peripheral. Peripherals do not require too much intelligence, but the main USB port requires processing power and control software. The USB (OTG) specification allows for certain peripherals to have limited master functions so that USB devices can communicate without a PC -based master.

The latest standard (USB 2.0) provides bus speeds of 1.5 Mbit/s ( low speed ) , 12 Mbit/s ( full speed ) and 480 Mbit/s ( high speed ) . Unfortunately, many users believe that devices labeled " USB 2.0 " always work at 480 Mbit/s . But many devices that follow USB 2.0 work at slower transfer rates.

When planning an embedded application, you need to know exactly which USB device to use —a printer, a mass storage unit, or an I/O controller. Then, decide how many ports you need, whether you need a master, a peripheral, or both. Most embedded applications do not require a peripheral port.

When evaluating port configuration, you should determine your data rate requirements. For example, although an application can transmit data at an average rate of 10 Mbit/s , it may also be necessary to transmit bursty data at a higher rate. Keep in mind that to achieve higher data transfers, you need to use a larger buffer at both ends of the USB connection. You may need to lower the performance requirements slightly to reduce the expensive buffering required for your design.

Figure 1   Single board machine such as EBC-C3Plus provides built-in USB host port

 

Figure 2   USB stack

If you are not sure about the data rate, you can purchase a development board from a USB host chip vendor and then simulate your application on a PC . Master chip suppliers include TransDimensions , Cypress Semiconductor, NEC and Philips Semiconductors. Take TransDimension as an example, it provides 2- port and 3- port master chips and software. In addition, many companies also sell chips as USB peripheral controllers.

The main controller chip supports a variety of software, from Philips ISP1561 supports Windows-based drive, to support a variety of software RTOS TransDimension device. Cypress EZ master IC provided for the drive Linux and VxWorks. All USB host ports require a "stack", and its simple meaning is the hierarchical arrangement of the software, as shown in Figure 2 . The layers form a structure from the bottom physical layer ( wiring and chip ) up to the top application software layer.

At the physical layer, chip and IP vendors have adopted standard software-interface connections that simplify the use of masters in embedded designs. Thus, the stack often follows the following standards: Open Host Controller Interface (OHCI) , Universal Host Controller Interface (UHCI) , or an updated Enhanced Host Controller Interface EHCI developed for the USB 2.0 specification . These specifications describe the register-level operations used by the host controller. Through the adoption of these standards, chip manufacturers offer a common interface to the driver software. The OHCI , UHCI, and EHCI specifications clarify the interoperability between the main controller registers and the driver software.

Typically, the hardware abstraction layer, or wrapper layer, shields the stack and drive from the specific implementation details of a particular microprocessor. The designer can obtain the source code of the wrapper layer, so it can be modified to fit the particular microprocessor and RTOS selected . If you don't want to delve into the software details of this layer, you can customize the packaging layer by the vendor. You may find that using a compatible microprocessor, stack, RTOS, and USB host controller will make development easier when you start your project .

In addition to the stack, developers will also need to control the drives of the peripherals. While Windows , Windows CE, and Linux can call a very wide variety of drivers for a variety of peripherals, you'll find that other operating systems don't offer the same variety of options. IC vendors offer USB -class drivers that provide the smallest set of functions needed to control a homogeneous device. Various types of devices include printers, cameras, human-machine interfaces, mass storage devices, communication devices, and more. For example, a printer-like driver can know the status of the printer, printer initialization, issue and receive printer data, and printer reset.

This way, you are likely to find a printer-like driver that works with a particular RTOS and processor. However, printer manufacturers can get more powerful drives based on this type of drive, which are often referred to as homogeneous software libraries. However, if you plan to control a custom I/O device, you are also prepared to write your own drive.

Although a PC can store hundreds or thousands of USB device drivers regardless of whether it is needed or not , embedded systems do not have such flexibility. So, you might only use peripherals that make sure you work with your system. Because many embedded applications have limited disk space, they are only equipped with drivers for several common devices. Remember, if you are not sure about the devices connected to the embedded system, you won't get a good design. When you consider software and drivers, please specify the details of the device that communicates with the USB port.

In some cases, the need for small size, high reliability or high volume production devices will require an embedded system from the board "Squeeze" into a chip. Therefore, engineers must obtain a license for intellectual property and integrate it into an ASIC or FPGA . Several companies offer USB host controllers in IP form . Mentor Graphics offers a full-speed USB controller, the Inventra , which can be used as a master or peripheral. Synopsys offers the DesignWare core, which has several types of USB ports. Finally, ARC offers several licenses for USB designs. Companies offer their USB cores in the form of VHDL or Verilog code .

Fortunately, the USB core comes with standard hardware interfaces, such as ARC 's Advanced High Speed ​​Bus (AHB) for its microprocessors , which can be used with a variety of other processor cores. IP vendors can also support the Peripheral Virtual Component Interface (PVCI) standard developed by the Virtual Socket Interface Alliance . If you decide to get a USB IP license, make sure it is appropriate for the selected RTOS . IP licensees offer a range of compatible software products and development tools. In addition, IP vendors can help with their own software.

Unfortunately, the scope of USB design considerations is far from being fully covered by this article. Readers are advised to read other related books and materials.

LED Shoebox Light

LED Shoebox Light,LED Gas Station Canopy Light,LED Outdoor Wall Lights ,LED Wall Pack Lights

LED Light Co., Ltd. , http://www.nblellight.com