Cypress EZ-USB FX2LP-based Logic Analyzer using Open Source sigrok PulseView - KBA229176

Version 6

    Author: SananyaM_56           Version: *A

     

    Question:
    How can I use Cypress EZ-USB® FX2LP-based kit as a logic analyzer using open source sigrok PulseView?

     

    Answer:

    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:

    1. Download PulseView from sigrok for your host OS from this link.

    2. 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.

    3. 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).

    4. 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.

    5. 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 onboard is a large EEPROM. Check the programming status on the status bar.

    6. 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.

    7. 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

    8. Open PulseView application and check if the device is selected. If it appears as <No Device>, follow the steps below to select the device.

    9. Click the drop-down arrow and select Connect to Device.

    10. In the Connect to Device dialog, select fx2lafw as the driver.

    11. Click Scan for devices using driver above. Select the device sigrok FX2 LA (16ch) with 16 channels.

    12. Click OK.

     

    Figure 3. Selecting the Device on PulseView

    13. 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

     

    References: