Future Technology Devices International Ltd. Application Note AN_107 Advanced Driver Options Document Reference No.: FT_000073 Version 2.53 Issue Date: 2014-03-13 This application note describes advanced driver settings and operations for FTDI's CDM Windows driver. This is intended to be a reference for experienced engineers developing products incorporating FTDI devices and drivers who are experts with FTDI devices.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 Table of Contents 1 Introduction .................................................................... 4 2 CDM USB Serial Converter Properties Page ..................... 5 3 2.1 Loading the COM Port Driver ..................................................... 5 2.2 USB Selective Suspend ..............................................................
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 7 6.7 Changing the Driver Priority .................................................... 22 6.8 Specifying the COM Port Allocation Start Value ....................... 23 6.9 USB Selective Suspend ............................................................ 24 System Options ............................................................. 25 7.1 Ignore Hardware Serial Number ....
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 1 Introduction This application note describes advanced driver settings and operations for FTDI's CDM Windows driver. This is intended to be a reference for experienced engineers developing products incorporating FTDI devices and drivers who are experts with FTDI devices.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 2 CDM USB Serial Converter Properties Page With the CDM driver, a property page is now available for the USB Serial Converter driver. This is at the same level as the original D2XX driver. Figure 2.1 USB Serial Converter Properties 2.1 Loading the COM Port Driver In the case of FT232R, FT245R and FT2232 devices, the driver type is determined by a setting in the device EEPROM.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 Note that “Load VCP” must be unchecked in order to enable Selective Suspend.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 3 CDM COM Port Advanced Properties Page An advanced properties page is available for devices using VCP drivers. To access the advanced properties page in Windows 2000 or Windows XP, go to "Control Panel > System" then select the "Hardware" tab and click "Device Manager…", or "Control Panel > Device Manager" in Vista.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 This page will allow the following parameters to be altered: COM port number USB buffer sizes Latency timer value Read and write timeout values Miscellaneous options USB Selective Suspend These options can also be configured as default values via the FTDIPORT.INF file before installation as indicated in FTDIPORT.INF Options.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 4 Modification of INF for Non-Default VID and PID Values In order to use FTDI drivers with devices that are identified by a VID and PID combination other than FTDI's VID and the device default PID, the driver INF files must be modified to match the desired VID and PID combination.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 In addition to the modifications made to the FTDIBUS.INF file to accommodate driver matching, the following entries in the FTDIPORT.INF file show text in bold that must be changed to match the VID and PID combination: [FtdiHw] %VID_0403&PID_6001.DeviceDesc%=FtdiPort,FTDIBUS\COMPORT&VID_0403&PID_6001 [FtdiHw.NTamd64] %VID_0403&PID_6001.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 5 FTDIBUS.INF Options Some default configuration options are configurable through FTDIBUS.INF. This section describes the options available and how to implement them. 5.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 USBView can be configured to show location IDs by selecting Options > Location IDs. The screen shot below shows a PC with a hub connected to location 0x0000002A and devices connected at locations 0x00000019 and 0x00002A3. Figure 5.1 USB View The INF entries for the devices connected to these ports would be [FtdiBus.NT.AddService.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 5.3 Limiting the Number of COM Ports That Can Be Installed The number of FTDI virtual COM ports that may be installed in a system can be limited by setting the MaxDevs parameter. MaxDevs defaults to 0, meaning that the feature is disabled and the driver will always attempt to create a COM port. The default can be overridden by including a nonzero MaxDevs value in the FTDIBUS.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 CopyFiles=FtdiBus.NT.Copy,FtdiBus.NT.Copy2 AddReg=FtdiBusA.NT.AddReg [FtdiBusA.NTamd64] CopyFiles=FtdiBus.NTamd64.Copy,FtdiBus.NTamd64.Copy2,FtdiBus.NTamd64.Copy3 AddReg=FtdiBusA.NT.AddReg [FtdiBusA.NT.HW] AddReg=FtdiBusA.NT.HW.AddReg [FtdiBusA.NTamd64.HW] AddReg=FtdiBusA.NT.HW.AddReg [FtdiBusA.NT.HW.AddReg] HKR,,"ConfigData",0x00010001,0 [FtdiBusA.NT.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 5.5 USB Timeout The USB timeout is the maximum time in milliseconds that a USB request can remain outstanding. It is unlikely that this will ever need to be changed from the 5000ms default value. This USB timeout (in milliseconds) is configurable through the FTDIBUS INF file in the INF fragments shown below: [FtdiBus.NT.HW] AddReg=FtdiBus.NT.HW.AddReg [FtdiBus.NTamd64.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 HKR,,"ConfigData",0x00010001,0x20 HKR,,"SSIdleTimeout",0x00010001,10000 This INF file fragment shows Selective Suspend enabled, and the Idle Timeout value set to 10 seconds.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 6 FTDIPORT.INF Options There are many configuration options available through FTDIPORT.INF. This section describes these options and how to configure them. 6.1 Aliasing Baud Rates FTDI devices can support non-standard Baud rates.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 HKR,,"ConfigData",1,01,00,3F,3F,10,27,88,13,C4,09,E2,04,71,02,38,41,9C,80,4E,C0,34,00, 1A,00, 0D,00,06,40,03,80,00,00,D0,80 This entry is byte-reversed, so MSB the DWORD reads 3F 3F 00 01 and the least significant bit is Bit 0.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 Please see AN232B-09 Using the Modem Emulation Mode in FTDI's VCP Driver for additional information on modem emulation mode. 6.5 Buffered Writes In some cases, it is possible that the hardware developer does not have control over the application software.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 6.6.1 Timeouts The read and write timeout values may be set through the FTDIPORT.INF file. [FtdiPort.NT.HW.AddReg] HKR,,"MinReadTimeout",0x00010001,0 HKR,,"MinWriteTimeout",0x00010001,0 This INF file fragment shows the minimum read and minimum write timeout values set to 0ms.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 The Cancel If Power Off option is controlled through bit 6 of byte 0 of the first DWORD of the ConfigData entry in the FTDIPORT.INF file. This is the same entry that contains the Baud rate table. The first DWORD is shown in bold in the INF fragment below. [FtdiPort.NT.HW.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 6.6.7 Disable Modem Ctrl At Startup This option is used to control the modem control signals DTR and RTS at startup. In normal operation, the modem control signals at startup follow the behaviour of the legacy port.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 Please note that the ConfigData entry is byte-reversed, so MSB the DWORD reads 3F 3F 00 01 and the least significant bit is Bit 0. With the driver default priority, the DWORD would read 3F 3F 00 01. With custom driver priority enabled, the DWORD would read 3F 3F 08 01.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 6.9 USB Selective Suspend The CDM driver supports USB Selective Suspend, a feature that allows the system to suspend devices that are not in use and thus reduce overall power consumption. USB Selective Suspend is controlled through bit 4 of byte 1 of the first DWORD of the ConfigData entry in the FTDIPORT.INF file. This is the same entry that contains the Baud rate table.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 7 System Options 7.1 Ignore Hardware Serial Number If devices have the same vendor ID and product ID but different serial numbers, the system will normally treat them as different devices. This causes the drivers to be installed for each device and create registry entries for each device.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 Figure 7.1 Edit System Variable Create a new System Variable called "DevMgr_Show_NonPresent_Devices" and set the value to 1, then click OK. Open the Device Manager ("Control Panel > System" then select the "Hardware" tab and click "Device Manager…", or "Control Panel > Device Manger" in Vista) and select "View > Show Hidden Devices".
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 8 Foreign Language Support There is a DLL available to display the VCP COM port properties page in languages other than English. To request a new language be made available in the DLL, please contact FTDI Support who will provide the text from the properties page to be translated into the desired language.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 9 Co-Installer The FT2232 and FT4232 devices are composite USB devices which are capable of providing two or more COM ports to a system. To ensure that the ports of these devices are allocated COM port numbers in the correct order (i.e. port A is allocated before port B) under Windows, a co-installer is used. The coinstaller is specified in the following sections of the FTDIPORT.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 10 Renaming Driver Files It is possible to rename the driver files to create a unique driver package, but this is not recommended. In order for the renamed driver package to work correctly, all references to file names in the INF files must be updated to use the new file names. FTDI does not currently support users who attempt to rename driver packages.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 11 Driver Pre-Installation Traditionally, the Found New Hardware Wizard has been the regular method for installing new hardware on a Windows machine. Microsoft has recognised that this requires some input from the end-user who may know very little about driver installation.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 In order to use DPInst to install the driver, DPInst.exe must be run. There are two versions of DPInst, a 32-bit version to install the 32-bit driver package (DPInstx86.exe in above screen shot) and a 64-bit version to install the 64-bit driver package (DPInstx64.exe in above screen shot).
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 12 Uninstalling Drivers With the release of Microsoft Windows Vista, the FTDI uninstaller has been rendered unusable due to Windows Resource Protection preventing the executable from deleting driver files and associated registry values. Vista will only allow the system itself to modify files and registry values in these locations.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.
Copyright © 2008-2014 Future Technology Devices International Limited 34
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 Appendix A – Appendix A.1 FTDIBUS.INF ; FTDIBUS.INF ; ; Copyright © 2000-2010 Future Technology Devices International Limited ; ; USB serial converter driver installation file for Windows 2000, XP, Server 2003, Vista, Server 2008, ; Windows 7 and Server 2008 R2 (x86 and x64).
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 DriverVer=07/12/2010,2.08.02 [SourceDisksNames] 1=%DriversDisk%,,, [SourceDisksFiles] ftdibus.sys = 1,i386 ftbusui.dll = 1,i386 ftd2xx.dll = 1,i386 FTLang.Dll = 1,i386 [SourceDisksFiles.amd64] ftdibus.sys = 1,amd64 ftbusui.dll = 1,amd64 ftd2xx64.dll = 1,amd64 ftd2xx.dll = 1,i386 FTLang.Dll = 1,amd64 [DestinationDirs] FtdiBus.NT.Copy = 10,system32\drivers FtdiBus.NT.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 [ControlFlags] ExcludeFromSelect=* [FtdiBus.NT] CopyFiles=FtdiBus.NT.Copy,FtdiBus.NT.Copy2 AddReg=FtdiBus.NT.AddReg [FtdiBus.NTamd64] CopyFiles=FtdiBus.NTamd64.Copy,FtdiBus.NTamd64.Copy2,FtdiBus.NTamd64.Copy3 AddReg=FtdiBus.NT.AddReg [FtdiBus.NT.Services] AddService = FTDIBUS, 0x00000002, FtdiBus.NT.AddService [FtdiBus.NTamd64.Services] AddService = FTDIBUS, 0x00000002, FtdiBus.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 ftdibus.sys [FtdiBus.NTamd64.Copy2] ftbusui.dll ftd2xx.dll,ftd2xx64.dll FTLang.dll [FtdiBus.NTamd64.Copy3] ftd2xx.dll [Strings] Ftdi="FTDI" DESC="CDM Driver Package" DriversDisk="FTDI USB Drivers Disk" USB\VID_0403&PID_6001.DeviceDesc="USB Serial Converter" USB\VID_0403&PID_6010&MI_00.DeviceDesc="USB Serial Converter A" USB\VID_0403&PID_6010&MI_01.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 ; THE POSSIBILITY OF SUCH DAMAGE. ; FTDI DRIVERS MAY BE USED ONLY IN CONJUNCTION WITH PRODUCTS BASED ON FTDI PARTS. ; FTDI DRIVERS MAY BE DISTRIBUTED IN ANY FORM AS LONG AS LICENSE INFORMATION IS NOT MODIFIED.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 %FTDI%=FtdiHw,NTamd64 [FtdiHw] %VID_0403&PID_6001.DeviceDesc%=FtdiPort.NT,FTDIBUS\COMPORT&VID_0403&PID_6001 %VID_0403&PID_6010.DeviceDesc%=FtdiPort.NT,FTDIBUS\COMPORT&VID_0403&PID_6010 %VID_0403&PID_6011.DeviceDesc%=FtdiPort.NT,FTDIBUS\COMPORT&VID_0403&PID_6011 [FtdiHw.NTamd64] %VID_0403&PID_6001.DeviceDesc%=FtdiPort.NTamd64,FTDIBUS\COMPORT&VID_0403&PID_6001 %VID_0403&PID_6010.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 [FtdiPort.NTamd64] CopyFiles=FtdiPort.NT.Copy,FtdiPort.NT.CopyUI AddReg=FtdiPort.NT.AddReg [FtdiPort.NT.HW] AddReg=FtdiPort.NT.HW.AddReg [FtdiPort.NTamd64.HW] AddReg=FtdiPort.NT.HW.AddReg [FtdiPort.NT.Services] AddService = FTSER2K, 0x00000002, FtdiPort.NT.AddService AddService = Serenum,,SerEnum_AddService DelService = FTSERIAL [FtdiPort.NTamd64.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 FTDI="FTDI" DESC="CDM Driver Package" DriversDisk="FTDI USB Drivers Disk" PortsClassName = "Ports (COM & LPT)" VID_0403&PID_6001.DeviceDesc="USB Serial Port" VID_0403&PID_6010.DeviceDesc="USB Serial Port" VID_0403&PID_6011.DeviceDesc="USB Serial Port" SvcDesc="USB Serial Port Driver" SerEnum.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.: FTDI# 63 Appendix B - Revision History Document Title: AN_107 Advanced Driver Options Document Reference No.: FT_000073 Clearance No.: FTDI# 63 Product Page: http://www.ftdichip.com/FTProducts.htm Document Feedback: Send Feedback Version 1.00 Initial Release January, 2005 Version 2.
Document Reference No.: FT_000073 Advanced Driver Options AN_107 Application Note AN_107 Version 2.53 Clearance No.