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: 
Observer swdave
Observer
595 Views
Registered: ‎09-18-2018

Can't get ZCU102 USB 3.0 port working in device mode with bare-metal

I am struggling to get the USB 3.0 port working on the ZCU102.  Everything seems to be in place in terms of the jumpers, the design in Vivado and the software.  However, I never see any USB messages on USB sniffer (Beagle USB 480).  With the board connected to my PC (with or without the sniffer), I don’t even see the D+ or D- signals being pulled high on a scope.  The VBUS pin shows +5V as expected.

At this point, everything is based on a bare-metal “Hello, World” application running on the A53 and the hardware design, both straight out of UG1209 Embedded Design Tutorial.    

Here is the I/O Configuration:

USB_IO_Config.png

I also added the USB0 3.0 port to the Isolation Configuration as shown:

USB_Isolation_Config.png

In the SDK, I then added the non-DFU files from the usbpsu example folder to the project as described at the ZynqMp USB Standalone Driver page here:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842468/ZynqMp+USB+Stadalone+Driver


From inside the main() function in helloworld.c, I called the main function in xusb_intr_example.c.

int main()
{
    init_platform();
    print("Hello World\n\r");
    usb_storage_main();  // main() from xusb_intr_example.c
    cleanup_platform();
    return 0;
}

I am following the jumper settings for the device mode as shown in these pictures:

J7 = OFF

J113 = Pins 1-2

J110 = Pins 1-2

https://photos.app.goo.gl/D6ijZDzvNUe8EEds9

When I step through the code, I don’t see anything suspicious.  No error codes are returned.  However, there is no evidence that anything is happening on the FPGA (USB device) side.  Like I said, the D+/D- pins are both held low.  No interrupts are triggered.

I haven’t tried building the Linux app and running that yet, but that might be next step.

Does anyone have any ideas what could wrong or where to look? 
Does anyone have a binary version I could try just to verify my board?

Thanks in advance,

Dave

0 Kudos
4 Replies
Xilinx Employee
Xilinx Employee
536 Views
Registered: ‎01-21-2008

Re: Can't get ZCU102 USB 3.0 port working in device mode with bare-metal

@swdave

Please refer the jumper settings for "Peripheral Mode" at the Wiki page online -  https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842047/Zynq+Ultrascale+MPSoc+Standalone+USB+device+driver?searchSessionId=d4d3a034-6471-436c-9c0f-3ef3277f4f83

Attached 2018.3 binaries for SDCARD ro boot my generated files for USB mass storage. Let me know if this works on your ZCU102 board or not?

Observer swdave
Observer
523 Views
Registered: ‎09-18-2018

Re: Can't get ZCU102 USB 3.0 port working in device mode with bare-metal

@jadhavs ,

Thank you so much for your reply and helpful image.

I booted your images from the SD card.  Windows detected a device on the bus and tried to enumerate it, but it could not complete the process.  It said it could not load the driver for the mass storage device and I get an "Unknown Device" in my Windows Device Manager.

When I put the Beagle USB sniffer in the system, I saw what looked like good USB messages between the Xilinx and the PC. 

A couple of questions:

- Is this image configured for USB3.0?  If so, do I need a USB3.0 cable for it to work?
- What type of connector do you recommend I use on the cable one the Xilinx end(micro-B, micro-AB)?
(I have production silicon.)

Before I saw your message, I was able to achieve similar results by using the FSBL built with standard HW image for the ZCU102 and then an ELF file I created using the mass storage code.  I am working on getting the same to work with my own HW image.

0 Kudos
Observer swdave
Observer
510 Views
Registered: ‎09-18-2018

Re: Can't get ZCU102 USB 3.0 port working in device mode with bare-metal

UPDATE: I got it to work using your boot image. Windows was able to format the drive and it showed up in Explorer.  

I built my own boot image with the FSBL from the embedded tutorial, the PMU from the tutorial and the usb mass storage test application.  I am very close.  Everything is running and Windows shows the "Mass Storage Device" in the Device Manager.  However, I do not get prompted to format the device and it does not show up as a drive in Windows Explorer. 

Does that make any sense to you?  I attached the log with CH9_DEBUG enabled in the USB example code.

Thanks a ton!  

0 Kudos
Observer swdave
Observer
457 Views
Registered: ‎09-18-2018

Re: Can't get ZCU102 USB 3.0 port working in device mode with bare-metal

Actually, I spoke a little too soon.  I was able to format the drive, but then any time I tried to access the newly formatted device, Explorer crashed. 

Q1: Any thoughts about why I can't actually use the formatted device?

In any case, you got me going in the right direction.  So, I started with a clean Vivado build based on the ZCU102.  I then used the SDK to create an FSBL for the R5.  That all works fine. Then, I created an app I called usb_test, which is again the mass storage device code compiled into an ELF file.  If I run the FSBL using the debugger and then download my usb_test.elf file using XSCT (with "dow" command), I see the USB messages going back and forth.  However, if I don't use the FSBL at all and just use the debugger to run my usb_test.elf code, the program runs, but no interrupts/messages are seen.  

Q2: What is the FSBL doing that I need in order to get the USB to work?

Thanks in advance,
Dave ...

0 Kudos