FX2

Cypress EZ-USB FX2 USB
Microcontroller

The following loops were examined from
[source:/gnuradio/trunk/usrp/firmware/src/usrp2/usrp_main.c usrp_main.c].

main( )

Initialize USRP

Initialize GPIF

Patch USB Descriptors (read from EEPROM, set HW device ID)

Setup Autovectors

Install USB Handlers

Re-enumerate

Run main_loop( )

main_loop( )

Check for USB setup packets

Check and log RX Overruns/TX Underruns

Check for packets to send back to host

Check for packets to send to FPGA

USB Endpoints

Different USB endpoints are used to logically separate different operations
occuring on the bus into separate flows. There are currently 3 USB endpoints
checked/used within the main_loop( ) as described earlier.

Endpoint

Description

0

Control/status

2

Host -> FPGA

6

FPGA -> Host

USB Transfers

All control information is written using endpoint 0 and the vendor commands. These commands are separated into two different categories: VRT_VENDOR_IN and VRT_VENDOR_OUT. These are processed in the app_vendor_cmd( ) function seen in [source:/gnuradio/trunk/usrp/firmware/src/usrp2/usrp_main.c usrp_main.c].

All control communication between the FPGA and FX2 microcontroller is done over the SPI. Daughterboards all seem to be controlled by the generic VRQ_I2C_* and VRQ_SPI_* commands.