• 0
Ankit

USB OTG on Zybo does not work

Question

10 answers to this question

Recommended Posts

  • 1

@Ankit

The Petalinux project that JColvin linked above is a fully functioning embedded Linux system. It includes USB host functionality on J10 and driver support for many of the common device types (mass storage, web cam, etc.). To test it, first ensure JP1 is shorted. Then boot the system as described in the petalinux project README.md and connect to a serial terminal over UART. When booted, attach a USB thumb drive and run the following command:

mount /dev/sda1 /mnt

The contents of the USB drive can then by accessed in the /mnt folder. If you are new to using Linux command line, you should google around how to do some basic tasks, such as 'ls' and 'cd'. You must run the following two commands prior to removing the thumb drive, in order to make sure you don't corrupt the drive:

umount /mnt
sync

Be sure that sync returns to the command line prior to removing the disk.

So that gives you a basic example of using the USB host on ZYBO, if you want an example closer to what you are trying to do I can probably point you in the right direction. All of the examples I point to will be based off of the Petalinux project, since Linux is really the most appropriate platform for using the J9 and J10 USB ports.

Share this post


Link to post
Share on other sites
  • 0

Hi @Ankit,

I have split off your comment into a separate thread since your question is specific towards the USB OTG rather than the USB UART which was the basis of the problem on the other thread. Have you tried out a Linux image, such as the Petalinux resources that @jpeyron directed you to in your other thread here?

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

@JColvin

do you have any example that makes use of usb port (j9) on zybo board as composite device , please let me know.

i m using windows 7 ,vivado and sdk . 

Share this post


Link to post
Share on other sites
  • 0

Hi @Ankit,

Unfortunately, we do not have any examples of using header J9 on the Zybo as a composite device through Vivado or Xilinx SDK. The only demo of using that port is through our Petalinux materials.

Thank you,
JColvin

Share this post


Link to post
Share on other sites
  • 0

@JColvin

i already checked that link there is no nothing that uses usb in host mode or device mode they provided only gpio example and one more example is there but i didn't find any thing on usb 

http://www.wiki.xilinx.com/Zynq-7000+AP+SoC+USB+CDC+Device+Class+Design+Example+Techtip

i also tried this example, after doing some changes it   worked but it uses usb for serial transmission and i don't want that. i m trying to decode this code but, 

i need proper usb protocol means as composite device or input or output device anything will work.

please send me any example if you can.

thank you !!

Share this post


Link to post
Share on other sites
  • 0

@sbobrowicz

thanks for your response ! 

can u share any example of usb as composite device.

tell me how i can use 245 FIFO mode of FTDI using this USB in device mode  

 

Share this post


Link to post
Share on other sites
  • 0

The USB port with the FTDI part is designed to be used with one port in UART mode and the other in JTAG mode. Digilent doesn't support using it in any other mode, including 245 FIFO. 

If you are just looking for a method to transfer data to/from the Zybo over USB your best options are UART or a USB Gadget driver of some sort.

Share this post


Link to post
Share on other sites
  • 0

I know this is an old link, but in case anyone is still interested, i managed to get this working by changing the system-user.dtsi file to

/include/ "system-conf.dtsi"
/ {

        model = "Zynq Zybo Z7 Development Board";
    compatible = "digilent,zynq-zyboz7", "xlnx,zynq-7000";

    chosen {
        bootargs = "console=ttyPS0,115200 earlyprintk uio_pdrv_genirq.of_id=generic-uio";
    };

    usb_phy0: usb_phy@0 {
        compatible = "ulpi-phy";
        #phy-cells = <0>;
        reg = <0xe0002000 0x1000>;
        view-port = <0x0170>;
        drv-vbus;
    };

};

&usb0 {   
    dr_mode = "host";
    usb-phy = <&usb_phy0>;
};

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now