Question: What is the status of the EZ-USB® FX2LP™ Windows® driver (CyUSB.sys)?
The FX2LP driver has evolved since the late ‘90s. Era 2000 Windows Driver Model (WDM) architecture is no longer the preferred architecture for the Windows Operating System. Microsoft® suggests migrating to Kernel-Mode Driver Framework (KMDF). The FX2 driver is no exception to this evolution and needs to be migrated to the newer architecture. Therefore, Cypress® decided to retire the FX2LP (CyUSB) driver after Windows 7 and adopt a newer KMDF architecture through the CyUSB3 driver that has support from XP through Windows 8.1.
CyUSB3.sys is a Microsoft certified driver for FX2LP devices from XP through Windows 8.1.
Question: What changes are needed to make the older EZ-USB FX2LP PC host application compatible with the new CyUSB3.sys driver?
The existing FX2LP application (based on CyUSB.sys) needs to be migrated to the newer driver (CyUSB3.sys) and its pairing library (CyUSB.dll). There is an application migration task that can be done quickly and easily.
Applications that are using the Cypress Library:
C# applications need to use the newer C# dll. First remove the old CyUSB.dll in your project’s References folder and add the newer CyUSB.dll in its place.
Figure 1. Add the New CyUSB.dll to the References Section of the Project.
C++ applications need static library and header file replacement in the source code as shown below.
- For header file replacement, you can add the newer CyAPI.h header files to your project in place of old ones or provide the path to where the newer CyAPI.h header file is located.
- For linking to the newer CyAPI.lib library:
- Select the Project property
- Select the Linker node under Configuration Properties.
- Select the Input node under the Linker.
- Add the lib path including the lib name (for example, ..\..\lib\x86\cyapi.lib) in the Additional Dependencies edit box as shown in Figure 2.
Fig 2: Add the New Library Path in Additional Dependencies
- In addition to CyAPI.lib , you also need to add setupapi.lib (the Microsoft® provided library) in Additional Dependencies before building the application.
Figure 3. Add setupapi.lib in Additional Dependencies
Applications that are using the Cypress Driver API directly:
Driver API compatibility is maintained during this driver architecture change. There will be little to no impact to the existing source. Any impact will be in terms of adding new header files to the application with the changed data structures. These data structure changes occurred because of additional USB 3.0 support.
The driver API differences are documented in the Cypress CyUSB3.sys Programmer’s Reference.