Copyright © 2008-2014 Future Technology Devices International Limited
15
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.HW]
AddReg=FtdiBus.NT.HW.AddReg
[FtdiBus.NT.HW.AddReg]
HKR,,"USBTimeout",0x00010001,5000
which corresponds to the registry entry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\{Device VID, PID and
interface}\{Serial number}\DeviceParameters\USBTimeout
The default value for the USB Timeout is 5 seconds (5000ms).
5.6
Disable EEPROM Writes
In some cases, it may be desirable to disable the ability to write to the device EEPROM. This can
be accomplished through a ConfigData bit in the FTDIBUS INF file.
The driver can be made to ignore any EEPROM write requests by setting bit 0 of the ConfigData
field as shown in the INF fragment below:
[FtdiBus.NT.HW]
AddReg=FtdiBus.NT.HW.AddReg
[FtdiBus.NTamd64.HW]
AddReg=FtdiBus.NT.HW.AddReg
[FtdiBus.NT.HW.AddReg]
HKR,,"ConfigData",0x00010001,1
which corresponds to the registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB\{Device VID, PID and
interface}\{Serial number}\DeviceParameters\ConfigData
5.7
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 5 of the ConfigData parameter and the SSIdleTimeout value (in
milliseconds) in the FTDIBUS.INF file.
For a standard installation, the following sections can be added to FTDIBUS.INF to enable Selective
Suspend:
[FtdiBus.NT.HW]
AddReg=FtdiBus.NT.HW.AddReg
[FtdiBus.NTamd64.HW]
AddReg=FtdiBus.NT.HW.AddReg
[FtdiBus.NT.HW.AddReg]
Copyright © 2008-2014 Future Technology Devices International Limited
16
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.
These values are held in the registry under this key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\{Device VID, PID and serial
number}\0000\Device Parameters
NOTE: If setting selective suspend for the driver bus layer it must not be set in the port layer (see
section 6.9)
Copyright © 2008-2014 Future Technology Devices International Limited
17
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. It is not necessary to alias Baud rates to
achieve this, but in cases where the application software tries to set a standard Baud rate and a
non-standard Baud rate is desired, this can be achieved by aliasing non-standard baud rates.
Baud rates are calculated using a Baud rate divisor. The file FTDIPORT.INF contains entries that
are used as the divisors for standard baud rates. By changing these values it is possible to alias
standard baud rates with non-standard values - for instance replacing 115k Baud with 512k Baud.
Users would then set up the device to operate at 512k Baud by selecting 115k Baud for the USB
serial port.
The procedure for calculating Baud rate divisors is described fully in application note
AN232B-05
Configuring FT232R, FT2232 and FT232B Baud Rates
.
The FT8U232AM device supports sub-integer divisors of 0, 0.5, 0.25 and 0.125 only. These values
can be configured through a Baud rate divisor table with two elements to define a Baud rate.
The extract below from FTDIPORT.INF gives an example of the Baud rate table for standard Baud
rates for the FT8U232AM device. Note that the Baud rate table is one line in the INF.
[FtdiPort.NT.HW.AddReg]
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
In the case of the FT232R, FT2232 and FT232B devices, sub-integer divisors of 0, 0.5, 0.25,
0.125, 0.375, 0.625, 0.75 and 0.875 are supported. This requires that the Baud rate table be
extended to four elements per Baud rate as indicated below. This example extract shows the four-
element Baud rate table for standard Baud rates. As with the original divisors, note that the Baud
rate table is one line in the INF.
[FtdiPort.NT.HW.AddReg]
HKR,,"ConfigData",1,11,00,3F,3F,10,27,00,00,88,13,00,00,C4,09,00,00,E2,04,00,00,71,02,
00,00,38,41,00,00,9C,80,00,00,4E,C0,00,00,34,00,00,00,1A,00,00,00,0D,00,00,00,06,40,00
,00,03,80,00,00,00,00,00,00,D0,80,00,00
The Baud rate table used by each device is located in the registry under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\{Device VID, PID and serial
number}\0000\Device Parameters\ConfigData
Please note that the four-element table will not allow the use of the additional sub-integer divisors
with FT8U232AM devices. The two-element table will work with all devices.
For a full explanation of calculating non-standard Baud rate divisors and how to arrange them in
the Baud rate table, see application note
AN232B-05 Configuring FT232R, FT2232 and FT232B
Baud Rates
.
6.2
Changing the Default USB Transfer Size
The default USB transfer size may be set up at installation through the ConfigData entry in the
FTDIPORT.INF file. This is the same entry that contains the Baud rate table.
The options can be set through the first DWORD of the table (shown in bold below)
[FtdiPort.NT.HW.AddReg]