Cypress EZ-USB FX2LP-based Logic Analyzer using Open Source sigrok PulseView - KBA229176
Author: SananyaM_56 Version: *B
How can I use Cypress EZ-USB® FX2LP-based kit as a logic analyzer using open source sigrok PulseView?
Figure 1 shows a CY7C68013A Mini Board.
Figure 1. FX2LP CY7C68013A Mini Board
There are two available variants of this mini board: one with a single jumper J1 and another with two jumpers (J1 and J2). Both boards come with an on/off switch and a RESET push button. The board also has an EEPROM (16 KB), which is used to hold the VID/PID/DID for the device (used by the host to identify the device to determine the correct driver).
The board with two jumpers was used to test the FX2LP logic analyzer. See the schematic attached with this knowledge base article (KBA). J1 is to connect or disconnect two LEDs from Vcc; these LEDs are connected to D0 and D1. J2 controls the high address bit of EEPROM making it appear at I2C address 0x51 depending on the jumper.
- J2 inserted: Comes up within bootloader mode with default USB descriptors.
- J2 removed: Comes up with the address 0x51 and can be programmed as a large EEPROM.
Follow these steps to test the FX2LP logic analyzer using CY7C68013A Mini Board:
- Download PulseView from sigrok for your host OS from this link.
- Select a VID/PID combination from the sigrok firmware file fx2lafw/api.c. This example uses 0x1d50 and 0x608d which correspond to the 16-channel logic analyzer.
- To program this VID/PID to the kit EEPROM, prepare an *.iic file with the selected VID/PID. The format of this .iic file should be - 0xC0 VID(L) VID(H) PID(L) PID(H) DID(L) DID(H) Configuration Byte.
For this example, the EEPROM contents are 0xc0 0x50 0x1d 0x8d 0x60 0x20 0x20 0x00 (see the attached *.iic file).
- Connect the J2 jumper on board and plug-in the kit using a USB Mini-B to A cable. The device will appear as Cypress FX2LP No EEPROM Device in Cypress USB Control Center application.
- Remove the J2 jumper. In the Cypress USB Control Center application, follow the path Program à FX2 à 64KB EEPROM to program the .iic file, since the EEPROM on board is a large EEPROM. Check the programming status on the status bar.
- After the programming is complete, press the kit reset button. The device will now boot up from EEPROM with the programmed VID/PID and will appear as Unknown Device in Device Manager as there are no installed drivers for this VID/PID.
- Use the Zadig tool (installed along with PulseView) to bind this device to the WinUSB driver as shown in Figure 2.
Once the driver is installed, a pop up appears stating that the driver was installed successfully. The device will appear as Unknown Device #1 in Device Manager.
Figure 2. Binding to WinUSB Driver using Zadig
- Open PulseView application and check if the device is selected. If it appears as <No Device>, follow the steps below to select the device.
- Click the drop-down arrow and select Connect to Device.
- In the Connect to Device dialog, select fx2lafw as the driver.
- Click Scan for devices using driver above. Select the device sigrok FX2 LA (16ch) with 16 channels.
- Click OK.
Figure 3. Selecting the Device on PulseView
- Click Run to start the capture on the channels. Note that pins PB0-PB7 and PD0-PD7 on the board act as channels 0-7 and 8-16 respectively. Figure 4 shows a capture session for a device as a 16-channel logic analyzer. Channel 0 and Channel 1 show decoded capture from an I2C transaction (see Decoders from PulseView user guide for more details).
Figure 4. Viewing Data on PulseView