UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
305 Views
Registered: ‎07-09-2018

Zynq 7020 USB Standalone - Getting Turnaround/Timeout Error on External USB Analyzer

I'm starting a new board design and using a MyIR Z-Turn 7020 as the development board for the initial code testing. Previous designs have used a Cypress FX2 and STM32F4. We wnat to maintain our USB protocol, which probably isn't the most ideal, but works.

Accessing the FPGA memory mapped registers through the USB interface and the ARM processor, I can get to all of the registers without issue for writes and reads. We have a slightly more special case where we store device configuration settings in an external EEPROM and for this, the reads of the EEPROM are working, but the writes are showing a Turnaround/Timeout error on my Teledyne USB analyzer. 

The basic process for this type of command is to send a Setup - Vendor command specifying the 64 byte offset to write a data packet to the EEPROM. The next USB transaction is the OUT packet (all on endpoint 0) of 64 bytes. This is initially NAK'd, followed by a Ping-ACK and then finally the OUT-NYET. I can see that the data is read into the temporary buffer from the SDK debugger. 

At this point, the EEPROM function is called to write the data and then given a success/failure response is then passed to the USB as a response to the intiail Setup command. The problem is that the IN packet is getting the error. After the OUT packet is NYET'd, the PC starts polling for an IN packet with a response code and I get 19 NAK's to that. When the ARM has completed, number 20 IN packet is perofmred, but the response from the ARM To the PC has the error. 

The EEPROM read process is similar, but with OUT/IN reversed basically and it doesn't have any issues. Does anybody have any ideas what's wrong with this situation? This process works on the FX2 and STM32F4 without fail, but I'm unable to figure out why the IN response is failing. I'm attaching a screen shot of the USB analyzer transaction in hopes that it spawns a solution.

For the curious, I've forced the 1-byte repsonse to be different values, but the value of 0 means success (XST_SUCCESS, happens to line up with our protocol). I've seen the other byte values where the Data field is, but still receive the turnaround/timeout error.

Thanks everybody!!ZynqFailedUsbTransaction.jpg

0 Kudos