Future Technology Devices International Ltd. Application Note AN_126 User Guide For FT232B/R Factory Test Utility Document Reference No.: FT_000176 Version 1.0 Issue Date: 2009-10-20 This application note explains how to use the FT232B or FT232R factory test utility which provides a user interface to program and test FTDI FT232B or FT232R devices. The accompanying software, ST232_ver1.4, replaces the previous FTDI utility (ST232R and ST232-245) used for this purpose. Future Technology Devices International Limited (FTDI) Unit 1,2 Seaward Place, Glasgow G41 1HH, United Kingdom Tel.: +44 (0) 141 429 2777 Fax: + 44 (0) 141 429 2758 E-Mail (Support): [email protected] Web: http://www.ftdichip.com Copyright © 2009 Future Technology Devices International Limited Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 Table of Contents 1 Introduction .................................................................... 2 2 Hardware Configuration .................................................. 3 3 Utility Basics ................................................................... 6 3.1 4 Operation .................................................................................. 6 Edit EEPROM.ini Parameters............................................ 9 4.1 VID/PID ID ............................................................................. 10 4.2 Description ............................................................................. 11 4.3 Power selection ...................................................................... 11 4.4 USB Remote Wakeup .............................................................. 12 4.5 Serial number ......................................................................... 12 4.6 Other settings ......................................................................... 13 5 Definition of Error Messages ......................................... 14 6 Contact Information ...................................................... 17 Appendix A - Revision History ............................................ 19 Copyright © 2009 Future Technology Devices International Limited 1 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 1 Introduction The ST232_ver1.4 program is intended for use in a FT232B or FT232R manufacturing test environment. ST232_ver1.4 replaces the previous FTDI utility used for this purpose called ST232R and ST232-245. It has a single button user interface and returns a simple pass or fail for USB - RS232 designs. The executable version is hard-coded for use with the default VID (0x0403) and PID (0x6001) and it can also support other VID and PID combinations by EEPROM.ini modification. The source code for this program is provided on the FTDI website at the C++ Builder examples page and can be built by C++ Builder 2009. The test program also requires a special cable to operate correctly. The features of ST232_ver1.4 are: 1. Auto-detect FT232B and FT232R 2. Support two testing methods: Y cable (The same with old method) and COM2 direct testing. 3. Selection test only or programming and testing. 4. Support EEPROM data programming by EPPROM.ini file or FTDI default. The EEPROM.ini file will be generated automatically. 5. Restore current setting ST232_ver1.4 is available as a free download from the Utilities page of the FTDI website. Copyright © 2009 Future Technology Devices International Limited 2 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 2 Hardware Configuration EEPROM Configuration: The FTDI FT232R device has an integrated 1024 Bit EEPROM, but the FT232B does not have such an integrated EEPROM. It requires an external 93C46 EEPROMs organized in 16-bit words. The FT232B also supports the 93C56 and 93C66 EEPROMs organized in 16-bit words. CABLE Configuration: This utility supports two testing methods. Both require a cable to be manufactured. Users require to select one test method and manufacture the appropriate cable. The following details the DB9 female connections for this cable: 1. Y cable (The same with old method): USB(DUT)Serial Pin 3 (TXD) to COM2 Pin 2 (RXD) USB(DUT)Serial Pin 2 (RXD) to COM2 Pin 3 (TXD) USB(DUT)Serial Pin 7 (RTS) to COM2 Pin 8 (CTS) USB(DUT)Serial Pin 8 (CTS) to COM2 Pin 7 (RTS) USB(DUT)Serial Pin 6 (DSR) to COM2 Pin 4 (DTR) USB(DUT)Serial Pin 5 (GND) to COM2 Pin 5 (GND) USB(DUT)Serial Pin 4 (DTR) to COM2 Pin 6 (DSR) USB(DUT)Serial Pin 1 (CDET) to COM1 Pin 4 (DTR) USB(DUT)Serial Pin 9 (RI) to COM1 Pin 7 (DTR) 2. COM2 direct testing: USB(DUT)Serial Pin 3 (TXD) to COM2 Pin 2 (RXD) USB(DUT)Serial Pin 2 (RXD) to COM2 Pin 3 (TXD) USB(DUT)Serial Pin 7 (RTS) to COM2 Pin 8 (CTS) USB(DUT)Serial Pin 8 (CTS) to COM2 Pin 7 (RTS) USB(DUT)Serial Pin 6 (DSR) to COM2 Pin 4 (DTR) USB(DUT)Serial Pin 5 (GND) to COM2 Pin 5 (GND) USB(DUT)Serial Pin 4 (DTR) to COM2 Pin 6 (DSR) USB(DUT)Serial Pin 1 (CDET) to COM2 Pin 4 (DTR) USB(DUT)Serial Pin 9 (RI) to COM2 Pin 4 (DTR) Operation System setting: To use this utility, the PC running the test must have one or two COM port. If the PC has two COM ports then one of two testing methods can be used. Copyright © 2009 Future Technology Devices International Limited 3 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 If the PC has one COM port then only the “COM2 Direct test” can be used. This requires that the user sets the COM port number to COM2. To do this, open the PC Device Manager and click the Port (COM & LPT), then choose the COM port of motherboard. This is illustrated below. Figure 2-1 Re-assign COM port number 1 Copyright © 2009 Future Technology Devices International Limited 4 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 Select the Port Settings then click “Advanced” Figure 2-2 Re-assign COM port number 2 Change the COM Port Number to COM2, and then click OK to finish the setting. Figure 2-3 Re-assign COM port number to COM2 Copyright © 2009 Future Technology Devices International Limited 5 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 3 Utility Basics When the test utility is run then the following screen appears: Figure 3-1 Default GUI The following sections explain how to use the selections on the GUI shown above. 3.1 Operation The utility has three sections: Device: This section displays existing setting of the EEPROM. Testing Method: There are two testing methods: the Y-cable test and the COM2 Direct Test. Test Method Description Y-cable test Using DB9 Y cable that is defined in section2 and the PC onboard Com1,Com2 for testing COM2 Direct Test Using DB9 Direct test cable that is defined in section2 and PC onboard Com2 for testing. Table 3.1 Test Method Selection switch Copyright © 2009 Future Technology Devices International Limited 6 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 EEPROM data: The following table describes the functions of these buttons: Disable EEPROM Test EEPROM Data Description of operation not selected Select “Default” Update Default data to EEPROM not selected Select “Read from file” Update EEPROM from EEPROM.ini selected No function No update EEPROM Table 3.2 EEPROM Data Selection switch The EEPROM data section has a switch, the default setting of EEPROM data is open. If “Disable EEPROM test” is selected, then the EEPROM data section will be hidden. In this state then the RS232 function only is tested. Figure 3-2 The GUI of Test Only If “Default” is selected then the EEPROM data will use the FTDI default setting. If “Read from file” is selected then the EEPROM data will use the setting from the “EEPROM.ini” file. When the utility is run, an EEPROM.ini file will be created automatically. When all settings have been selected then, press the “Test” button. If the test passes and the device has been programmed then the following is displayed. Copyright © 2009 Future Technology Devices International Limited 7 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 Figure 3-3 The GUI shows Pass message after testing Copyright © 2009 Future Technology Devices International Limited 8 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 4 Edit EEPROM.ini Parameters When user executes the test utility, it will automatically generate an EEPROM.ini file in the same folder. The EEPROM.ini file stores some EEPROM programming parameters and saves recent utility settings automatically. When user runs the utility, it will load the recent settings stored in EEPROM.ini file. The default contents of EEPROM.ini are list below. [GENERNAL] FT_VENDOR_ID=0x0403 FT_PRODUCT_ID=0x6001 FT_MANUFATURER_STRING=FTDI FT_MANUFATURER_ID=FT FT_PRODUCT_STRING=USB Serial Converter FT_MAX_POWER=44 SELF_POWERED=0 REMOTE_WAKEUP=1 [FT232B] SERNO_ENABLE=0 [FT232R] SERNO_ENABLE=1 [SETTING] EPPROM_EN=1 TEST_METHOD=0 READ_FROM=0 Copyright © 2009 Future Technology Devices International Limited 9 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 Figure 4-1 Read EEPROM configuration from EEPROM.ini file If a user selects the “Read from File” setting and then presses the “test” button, the utility will also load the EEPROM parameters from the EEPROM.ini and program into the device. Please check the detailed EEPROM.ini parameters explanation in the following paragraphs. 4.1 VID/PID ID In the EEPROM.ini file, the parameters of “FT_VENDOR_ID” and “FT_PRODUCT_ID” can be used to set Vendor ID and Product ID of USB configurations. If the FTDI default values are used, the VID and PID are fixed to 0x0403/0x6001. If custom USB Vendor ID and Product ID are used then it is necessary to change value of the “FT_VENDOR_ID” and “FT_PRODUCT_ID” in EEPROM.ini file to match these custom VID and PIDs. Please refer to the following example to modify the EEPROM.ini file. FT_VENDOR_ID=0x1234 // Set VID to 1234 of HEX FT_PRODUCT_ID=0xABCD // Set PID to ABCD of HEX Note that if non-standard VID and/or PID values are used the driver INF and INI files must be modified to accommodate the new VID and PID combination. Please refer to the application note AN-107. Copyright © 2009 Future Technology Devices International Limited 10 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 4.2 Description In the EEPROM.ini file, “FT_MANUFATURER_STRING”,” FT_PRODUCT_STRING” and “FT_MANUFATURER_ID” can be modified to change the description of device. The serial number is automatically chosen as a random value. Note that the Maximum length of descriptors is 48 words. The descriptors include the manufacturer/produce Description and serial number that total 48 words. 4.3 Power selection The “FT_MAX_POWER” and “SELF_POWERED” can be used to set USB description power selection. The value of SELF_POWERED is 0, the device description is set in BUS powered mode. The value of SELF_POWERED is 1, the device description is set in Self powered mode. When a device is set in BUS powered mode, the value of “FT_MAX_POWER” will be used. Please refer the following example on how to modify the EEPROM.ini file. FT_MAX_POWER=100 // Set the description of USB Max power to 100mA SELF_POWERED=0 // Set USB description of power mode to Bus Power All USB Devices: The maximum current that can be supplied over the USB bus without violating the USB specification is 500mA. Do not enter a value of more than 500mA in the Max Bus Power field. High power bus powered products. These products consume between 101mA and 500mA from the USB bus and can be plugged into any USB host. However, such products can only be plugged into self powered USB hubs (hubs that have their own power supply) as bus powered USB hubs can only supply 100mA per hub port. Bus Powered USB Devices These fall into two categories: Low power bus powered products. These products consume 100mA or less from the USB bus and can be plugged into any USB host or hub port. High power bus powered products. These products consume between 101mA and 500mA from the USB bus and can be plugged into any USB host. However, such products can only be plugged into self powered USB hubs (hubs that have their own power supply) as bus powered USB hubs can only supply 100mA per hub port. Copyright © 2009 Future Technology Devices International Limited 11 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 Self Powered USB Devices These devices fall into two categories: True self powered products. These products have their own power supply and do not require any current from the USB bus. Enter a value of zero in the Max Bus Power field. Hybrid self powered products. These products have their own power supply, but also draw some of their operating current from the USB bus. Enter the current draw from the USB bus in the Max Bus Power field. 4.4 USB Remote Wakeup The FT232R and FT232B are capable of resuming a PC from the USB suspend (sleep) state via the RI# pin. To use the remote wake-up capability, enable this option by value of “REMOTE_WAKEUP”. REMOTE_WAKEUP = 0 means disable. REMOTE_WAKEUP =1 means enable. 4.5 Serial number Because the utility supports two devices (FT232B and FT232R), the EEPROM.ini file has two serial number selections. Users can set [FT232R] and [FT232B] with different items. SERNO_ENABLE =0 means disable serial number SERNO_ENABLE =1 means enable randomly generated serial number. Please refer the following example to modify the EEPROM.ini file. [FT232B] SERNO_ENABLE=0 // If the device is FT232B, disable the USB serial number description. [FT232R] SERNO_ENABLE=1 // If the device is FT232R, generate the USB serial number description automatically. Copyright © 2009 Future Technology Devices International Limited 12 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 4.6 Other settings The utility saves any setting changes automatically. When a user runs the utility, it will load the settings stored in the EEPROM.ini file. Additional settings of the EEPROM.ini are listed below. EPPROM_EN: 0: enable EEPROM Data section 1: disable EEPROM Data section TEST_METHOD: 0: use the Y Cable test 1: use the COM2 Direct test READ_FROM: 0: set in Default 1: set in read from file Copyright © 2009 Future Technology Devices International Limited 13 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 5 Definition of Error Messages The following section shows some error messages which may be displayed if issues occur. It also indicates possible reasons for the failure to help with factory debugging. If the PC used to test the device does not recognise the motherboard COM ports, then the following message is displayed. To avoid this issue, please use a PC that has a COM ports. If user uses “COM2 Direct test”, the PC must have COM2 port. If user selects”Y cable test”, the PC must have COM1 and COM2 ports. Figure 5-1 Failure message 1 If the COM port test cannot detect the DTR signal, then the following message is displayed. Please check your DTR connection of the board or cable. Copyright © 2009 Future Technology Devices International Limited 14 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 Figure 5-2 Failure massage 2 If the COM port test cannot detect the CD signal, then the following message is displayed. Please check your CD connection of the board or cable. Figure 5-3 Failure message 3 If the device cannot be seen by the PC, then the following error message is displayed. Please check the device is connected to the PC and that the PC has recognised the device. Copyright © 2009 Future Technology Devices International Limited 15 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 Figure 5-4 Failure message 4 If the test fails with the following message then the utility cannot program the EEPROM. Please check your EEPROM or device soldering. Figure 5-5 Failure message 5 Copyright © 2009 Future Technology Devices International Limited 16 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 6 Contact Information Head Office – Glasgow, UK Future Technology Devices International Limited Unit 1,2 Seaward Place, Centurion Business Park Glasgow G41 1HH United Kingdom Tel: +44 (0) 141 429 2777 Fax: +44 (0) 141 429 2758 E-mail (Sales) [email protected] E-mail (Support) [email protected] E-mail (General Enquiries) [email protected] Web Site URL http://www.ftdichip.com Web Shop URL http://www.ftdichip.com Branch Office – Taipei, Taiwan Future Technology Devices International Limited (Taiwan) 2F, No. 516, Sec. 1, NeiHu Road Taipei 114 Taiwan , R.O.C. Tel: +886 (0) 2 8791 3570 Fax: +886 (0) 2 8791 3576 E-mail (Sales) [email protected] [email protected] E-mail (Support) E-mail (General Enquiries) [email protected] Web Site URL http://www.ftdichip.com Branch Office – Hillsboro, Oregon, USA Future Technology Devices International Limited (USA) 7235 NW Evergreen Parkway, Suite 600 Hillsboro, OR 97123-5803 USA Tel: +1 (503) 547 0988 Fax: +1 (503) 547 0987 E-Mail (Sales) [email protected] E-Mail (Support) [email protected] Web Site URL http://www.ftdichip.com Branch Office – Shanghai, China Future Technology Devices International Limited (China) Room 408, 317 Xianxia Road, Shanghai, 200051 China Tel: +86 21 62351596 Fax: +86 21 62351595 E-mail (Sales) [email protected] E-mail (Support) [email protected] E-mail (General Enquiries) [email protected] Web Site URL http://www.ftdichip.com Copyright © 2009 Future Technology Devices International Limited 17 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 Distributor and Sales Representatives Please visit the Sales Network page of the FTDI Web site for the contact details of our distributor(s) and sales representative(s) in your country. Vinculum is part of Future Technology Devices International Ltd. Neither the whole nor any part of the information contained in, or the product described in this manual, may be adapted or reproduced in any material or electronic form without the prior written consent of the copyright holder. This product and its documentation are supplied on an as-is basis and no warranty as to their suitability for any particular purpose is either made or implied. Future Technology Devices International Ltd will not accept any claim for damages howsoever arising as a result of use or failure of this product. Your statutory rights are not affected. This product or any variant of it is not intended for use in any medical appliance, device or system in which the failure of the product might reasonably be expected to result in personal injury. This document provides preliminary information that may be subject to change without notice. No freedom to use patents or other intellectual property rights is implied by the publication of this document. Future Technology Devices International Ltd, Unit 1, 2 Seaward Place, Centurion Business Park, Glasgow G41 1HH United Kingdom. Scotland Registered Number: SC136640 Copyright © 2009 Future Technology Devices International Limited 18 Document Reference No.: FT_000176 User Guide For FT232B/R Factory Test Utility Application Note AN_126 Version 1.0 Clearance No.: FTDI# 111 Appendix A - Revision History Revision History Version 1.0 First Release 20/10/2009 Copyright © 2009 Future Technology Devices International Limited 19