Introduction

It looks like the FTDI USB-Serial saga continues. A USB-Serial (also known as USB-to-UART) interface is used to connect up PCs to hardware devices using the USB port. FTDI was traditionally a manufacturer of the interface chips for this purpose.

 

This blog post examines how to connect up UART (serial) based devices to a PC. This feature was often relegated to a FT232 chip from FTDI. However nowadays many microcontrollers have built-in USB interfaces and this ancillary FTDI part is not needed.

 

For the scenarios where a dedicated USB Serial IC is needed, there are options other than FTDI parts. Nowadays there is some motivation to examine non-FTDI parts for this function.

An example design: the Arduino Uno doesn’t use an FTDI part – it has used an Atmel ATmega part for half a decade.

arduino-serial-r.jpg

 

About eighteen months ago, FTDI did something that possibly could have caused people to claim for legal damages in many countries. It went against ethics according to some engineers, and as mentioned it was possibly actionable in law in certain countries. Manufacturers can be legally liable for damage that their products cause to other property. According to reports the FTDI driver deliberately 'bricked' (by which I mean rendered inoperable for non-technical users, requiring detailed procedures to revert back to the original state) the USB Serial interface in products that had a chip which was not manufactured under license from them but was attempting to use their driver. They did this by forcibly zeroising an EEPROM memory field in the user's product.

It is unknown how many devices were bricked, nor if FTDI offered to make good and provide compensation to users who had bricked products. FTDI's go-to guy for press releases was asked several times to comment last month but he refused.

 

FTDI's Current Solution

FTDI eventually backtracked to a degree and their recent drivers no longer perform such EEPROM memory overwriting. But, it seems that their solution is to make their driver generate 'fake' serial data which spells out 'NON GENUINE DEVICE FOUND'. This data is unobservable to a normal non-technical user of products.  The user may just experience unusual symptoms, or complete failure of their product. The unusual symptoms will vary from product to product. Note that non-genuine could mean a fake part or a clean room design. Also note that reverse-engineering can sometimes be legal.

The subtle difference between the situation now and the situation eighteen months ago is that the product can be effectively rendered temporarily unusable by FTDI without modifying EEPROM contents. By not modifying EEPROM contents any longer perhaps FTDI are trying to avoid liability but in my opinion it is still questionable if this is responsible practice nor am I sure on the legality.

 

Who Suffers?

There is a school of thought that what FTDI is doing is a valid thing to do - after all, they are protecting their investment and if a product fails to work with the new drivers, the user has some rights to take the product back to the manufacturer. The product manufacturer can then compensate the user, and then seek liability from the distributor of the USB-serial chip that they used. In theory everyone gets compensated along this chain apart from the manufacturer of the supposedly fake parts. In practice not all loss is recoverable even if everyone along the chain pays what they legally owe. Pure economic loss is not legally recoverable in some countries for example. Nor is it always possible to prove causation. If you lose a potential 100-million-dollar deal due to people hearing about your flaky product that had a ‘fake’ FTDI chip inside it, it will be hard to recover the 100-million dollars from your supplier.

Furthermore in practice the (non-technical) user suffers because the user was not aware of the origins of the chip (which forms just a fraction of the end product), nor whether the chip was produced under license from FTDI or not.

combined.jpg

 

Some users could throw out their product thus suffering some loss if their product was outside the warranty period and they had naturally assumed some part had reached the end of its life.

This is not just theoretical. Another manufacturer of USB-serial chips, Prolific, had a slightly similar issue in the past with their PL2303 IC. They upgraded their driver, rendering some products inoperable. It is unknown if it was deliberate like FTDI. One of my USB-Serial adapters was from a well-known high-street store, and it contained what I believed to be a genuine PL2303 part. I had no reason to believe (and I still don't) that the high-street store's supplier had used a manufacturer that would deliberately source parts that were non-genuine Prolific parts. Without further information I believe it had been accidental. The workaround of modifying Windows '.inf' files was complex - definitely not something that non-technical users may wish to attempt.

There is also the possibility that more serious harm could occur if a product behaved unexpectedly. FTDI parts are used in vehicle on-board diagnostic (OBD) tools; imagine if someone relied on erratic or incorrect data egressing from the software for such a device to adjust their vehicle. FTDI are in the unfortunate position that they won’t always know about the end product that their chip is used for. However they are not the only ones.

 

I was happy to know an Engineering Director who committed to removing (and did remove) licensing lock limits in a communications product simply because he couldn’t guarantee that the lock might prevent communications for a user during a hypothetical emergency (public emergency for example) for want of a license fee that was late. It was better to trust that the vast majority of users will be honest and at some stage pay up, and take the hit that some won’t, and sleep better at night knowing your product will function in emergencies regardless of whether the purchaser forgot to pay the license fee or not. Not everything in life has to be about revenue policing.

There is a suggestion that the FTDI 'NON GENUINE DEVICE FOUND' problem can be avoided in new designs by engineers not using FTDI USB-serial chips inside products - then there is no risk of their product containing a non-genuine FTDI part by accident.

 

When and Why is Reverse Engineering Allowed for Interoperability?

It could be considered that possibly ‘fake’ or ‘clean room design’ manufacturers should write their own drivers and that therefore FTDI are in their right to do whatever they desire to prevent interoperability. However at the same time it is worth noting is that in Europe it has been legal for a very long time to have interoperability at software interfaces, and in certain circumstances it is even legal to reverse engineer existing software to achieve this aim under Europe’s Software Directive. For FTDI to take the stance to send data strings containing ‘NON GENUINE DEVICE FOUND’ means they are deliberately preventing interoperability at a particular interface which can be legal. But it may (this is just a personal opinion – seek legal advice) also allow people to legitimately have the right to continue to examine and reverse engineer FTDI parts in order to continue to achieve interoperability in the future with clean room designs that interoperate at that boundary. Why is this important? Imagine a product with an embedded copy of Windows running inside it. It could be a high-end test instrument costing tens of thousands of dollars. And its accessories might all contain FTDI parts which connect to the USB interfaces on the test tool. Ten years from now either FTDI and/or the product manufacturer may have moved on to other things or the products and software may no longer be under any support, and users may wish to connect third party or custom accessories because the original accessories are no longer fit for purpose, or to resolve bugs in the hardware discovered long after FTDI ceases to exist. Many parts including FTDI parts have errata. If it is illegal to interoperate using third party devices, the entire test instrument investment may be lost. This might seem a contrived example but the point is that the future cannot always be accurately predicted.

 

What can we do?

We can't change a mindset easily it appears. Eighteen months on the repercussions are still being felt and fake data is being generated by FTDI drivers when they detect (in FTDI's opinion) non-'genuine' devices. But we can design USB to Serial interfaces with the wealth of other interesting parts if we wish to.

 

What other USB Serial Interface Parts are Available?

Four choices which require no crystal and the bare minimum parts (usually just a couple of capacitors) were investigated and their attributes are listed in the table further below and compared with the FT231X chip used in FTDI’s Nero project. Although the investigation is merely a datasheet comparison, it would be great to hear people’s experiences on these and other parts. To kick off, I have tried the MCP2221. I also intend to try the Cypress part in the table below.

 

The Microchip MCP2221 is a nice part as can be seen from the table. It is available in prototype-friendly packages (including DIP!) and is extremely easy to use. For an example MCP2221 project see here.

Here it is being used with the BeagleBone Black..

bbb-mcp2221.jpg

 

The CP2102 from Silicon Labs is another option. It works well and is therefore extremely popular.

silabs-cp2102.jpg

 

A very interesting device appears to be Cypress CY7C65213 - it looks ideal for modern applications where the device can negotiate higher current for battery charging. It is available in a fairly easy-to-prototype SSOP package as well as QFN for compactness. The Exar XR21B1421 has built-in 15kV ESD protection and supports very high baud rates.

 

#Feature

Microchip

MCP2221

Silicon Labs

CP2102

Cypress

CY7C65213

Exar

XR21B1421

FTDI

FT231X

1MemoryYes, for configuration1kByte 100,000 write cycles512Byte 100,000 write cyclesOTP2kByte 2,000 write cycles
2Baud Rate300-1M300-1M300-3M300-12M300-3M
3Current Consumption13mA20mA13mA13mA8mA
4Suspend Consumption46uA80uA5uA850uA125uA
5USB Impedance MatchingBuilt-inBuilt-inBuilt-inBuilt-inRequires external resistors and capacitors
6Internal LDOYes – 3.3V unclear if available to external circuitsYes – 3VYes but not available to external circuitsYes – 3.3V unclear if available to external circuitsYes – 3.3V 50mA output capability
7Hardware Flow Control PinsNoYesYesYesYes
8General Purpose I/OYes - 4NoYes - 8Yes – 10 (shared with Flow Control pins)Yes - 4
9USB Battery Charger DetectionNoNoYes, SDP, CDP, DCPNoYes, DCP
10Wake up time from Suspend65ms25us20ms
11ESD Protection (HBM)4kVRequires TVS diodes2.2kV15kV2kV
12Additional Feature HighlightsUSB HID capability, Built-in I2C Master, Built-in ADC (3 channel), DAC and InterruptCan use pin-compatible CP2109 with PROM for lower cost production devicesSupports PHDC (Personal Healthcare Device Class)USB HID capabilityUART inversion capability
131.8V I/O SupportYesNo, requires external level convertersYesYesYes
14Price in GBP each (qty of 100)1.061.70

1.35

(0.94 for 2000)

1.68

1.37

(1.00 for 1000)

15Packages availableDIP-14, SOIC-14, TSSOP-14, QFN-16QFN-28SSOP-28, QFN-32QFN-24, QFN-28SSOP-20, QFN-20

 

Note: The data in the table is believed to be reasonably accurate but please check the product datasheets before implementing a design!

 

Summary

Depending on requirements there are some great options available. For hobbyists the MCP2221 comes in easy-to-use packages and has a lot of interesting features to save time and money as well as USB HID which is excellent to see. It is a great all-round part. For commercial designs it is available in extremely compact packages and at low cost. For modern designs with extremely low standby current (this would make it ideal for connecting to mobile phone handsets!) and ultra-fast wake up times, high density of digital I/O as well as the ability to support charge current negotiation, the Cypress CY7C65213 could be a very good option.