USB-IF Compliance Testing Tips #2 – Pre-Compliance Testing

One question we are often asked is, “How long will the testing take?” The answer to this question can lead to very different consequences depending on the vendor’s schedule. If the device is expected to go on the market within the next year, then the answer is merely logistical. However, if the device is expected to go to market next week, then testing at this point is a leap of faith, simply because there is no guarantee that the device will pass. Time for debugging must be a factor in test scheduling.

No matter how well constructed, well engineered, and well thought-out a device is, there are always corner cases that can force the device to stumble. Therefore, when scheduling the compliance test, it is important to allocate some time for troubleshooting and debugging potential problems. These problems may not be the obvious ones like signal quality, basic enumeration, or inrush. The problem can be a very subtle failure: for example, the device might fail because it draws too much current on a hub with a suspended port. Or perhaps it has a back-drive failure because the D+ pull up is hardwired. Regardless of the type of failure, it is important to recognize that there may be unforeseen difficulties. Therefore, if it is feasible, testing should be scheduled around these unfortunate possibilities.

Developers should consider the benefits of testing before the ultimate factory-grade product is complete. This can be done internally or through a test lab. MCCI frequently tests devices that are not in their final state. We perform what we call half-tests on devices that may not even have OS drivers yet. While bringing such a device to an actual USB-IF Compliance Workshop may not be worth the time and effort, we strongly advise you to either send your unfinished devices to a certified test lab like MCCI or to test them internally. Ultimately, the time and money you spend on testing early in the development will save you money overall. The cost of running a half-test on a development platform with the silicon that will be in the final product is much less than the cost of re-spinning the silicon later.

Naturally, early testing might not catch everything. There can always be PCB layout changes or changes in the manufacturing BOM that cause unintended results. Last-minute problems are very frequently encountered and can never be completely eliminated. Still, more often than not, early testing and adequate planning to include enough debug time during the final test will greatly alleviate the ravages of any last minute catastrophes that do arise.

USB-IF Compliance Testing Tips #1 – Command Verifier (CV)

The process of obtaining USB-IF certification can be difficult, but not just because of the specification requirements. Often developers uncover problems not related to USB compliance during certification testing. For this reason, it can be helpful to test as early as possible, preferably well before the product is scheduled to be released. Of course, it is not always possible to test early, either because product requirements are in flux, extensive debug is necessary, or even because final hardware is not available. It occurred to us here at MCCI that it might be helpful for us to outline some tests that engineers can perform on their USB products in advance of those products entering the Compliance Lab. Using them may help flush out compliance problems during normal, pre-test development.

The tests we are recommending are tests that most consumer electronics product engineers should be able to perform with a small hardware investment and as little overall cost to their test budget as possible. After all, with the economic environment being what is, anything we can do to help companies avoid extra test costs or delayed market releases is for the best. Some of these tests we’re going to tell you about come from the USB-IF compliance test suite, while others are our original work. Regardless, it is our hope to help you achieve USB-IF compliance for your USB product.

CV

This handy tool is a bit of software that the USB-Implementers Forum (USB-IF) uses to test a device’s basic functionality. CV, or Command Verifier, tests for compliance with Chapter 9 of the USB 2.0 specification. CV is one of the most helpful tests a developer can run on their device. Run it as early as possible. It will test enumeration, the device’s descriptors, and the device’s response to a number of specific requests.

The CV test program is free and can be downloaded from the USB-IF website:

http://www.usb.org/developers/tools/

Setup is fairly straightforward. In addition to the device, all the user needs is a high-speed host controller and a high-speed hub. When CV runs it takes control of the high-speed host controller (EHCI). The high-speed hub is then plugged into the host, and the device being tested is plugged into the high-speed hub. CV enumerates the device being tested without the use of any Windows drivers. CV can be run on either Windows XP or Windows 7 systems.
CV sends various commands through the bus, analyzes the responses from the device, and logs the various results into an html file. While it does not test every aspect of the Chapter 9 requirements, a passing test assures developers that they are on the right track.