I want touse the"USBOTG"availableonZybodevelopment board. With "USB OTG" in "Host Mode" I connect an USB pen drive (FAT32) and reading a file at fixed rate (about 5Mbit/s) for streaming data to logical part(PL).
With default setup of Zybo that boot from QSPI I have made some test, without success.
I have used an "Consumer USB pen drive", of 8 GByte, formatted with FAT32 and preload "largefile" with size of 1Gbyte.
(1) Follow user guide of Zybo
When acting as an embedded host, the USB A connector (J10) should be used to
connect to a USB peripheral device, and JP1 should be shorted
JP1 is shorted with jumper
While in host mode, the ZYBO is technically an "embedded host", because it does
not provide the required 150 μF of capacitance on VBUS required to qualify as a
general purpose host. It is possible to modify the ZYBO so that it complies with
the general purpose USB host requirements by loading C64 with a 150 μF capacitor
and shorting JP2. Only those experienced at soldering small components on PCBs
should attempt this rework. Many USB peripheral devices will work just fine
without loading C64. Whether the ZYBO is configured as an embedded host or a
general purpose host, it can provide 500 mA on the 5V VBUS line.
I have load C64 with ceramic 150uF/6.3V and shorting JP2 for "USB host"
I have :
- JP1 is shorted with jumper
- Load C64 with ceramic 150uF/6.3V and shorting JP2 for "USB host"
(2) After insert USB pen drive (FAT32 8 GByte)
zynq> usb 1-1: new high-speed USB device number 2 using xusbps-ehci
usb-storage 1-1:1.0: USB Mass Storage device detected
scsi0 : usb-storage 1-1:1.0
scsi 0:0:0:0: Direct-Access USB DISK 1100 PQ: 0 ANSI: 4
sd 0:0:0:0: [sda] 15730688 512-byte logical blocks: (8.05 GB/7.50 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] No Caching mode page present
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
Zybo recognizes USB pen drive without problems
(3) Mount USB pen drive
zynq> mkdir /mnt/pendrive
zynq> mount -w -t vfat /dev/sda1 /mnt/pendrive
zynq> ls /mnt/pendrive -l
total 1048576
-rwxr-xr-x 1 root 0 1073741824 Apr 28 2016 largefile
(4) Test read speed (file of 1 GByte is present on USB pen drive "largefile")
Question
debugasm
Hi,
I want to use the "USB OTG" available on Zybo development board. With "USB OTG" in "Host Mode" I connect an USB pen drive (FAT32) and reading a file at fixed rate (about 5Mbit/s) for streaming data to logical part (PL).
With default setup of Zybo that boot from QSPI I have made some test, without success.
I have used an "Consumer USB pen drive", of 8 GByte, formatted with FAT32 and preload "largefile" with size of 1Gbyte.
(1) Follow user guide of Zybo
When acting as an embedded host, the USB A connector (J10) should be used to connect to a USB peripheral device, and JP1 should be shorted JP1 is shorted with jumper While in host mode, the ZYBO is technically an "embedded host", because it does not provide the required 150 μF of capacitance on VBUS required to qualify as a general purpose host. It is possible to modify the ZYBO so that it complies with the general purpose USB host requirements by loading C64 with a 150 μF capacitor and shorting JP2. Only those experienced at soldering small components on PCBs should attempt this rework. Many USB peripheral devices will work just fine without loading C64. Whether the ZYBO is configured as an embedded host or a general purpose host, it can provide 500 mA on the 5V VBUS line. I have load C64 with ceramic 150uF/6.3V and shorting JP2 for "USB host"
I have :
- JP1 is shorted with jumper
- Load C64 with ceramic 150uF/6.3V and shorting JP2 for "USB host"
(2) After insert USB pen drive (FAT32 8 GByte)
zynq> usb 1-1: new high-speed USB device number 2 using xusbps-ehci usb-storage 1-1:1.0: USB Mass Storage device detected scsi0 : usb-storage 1-1:1.0 scsi 0:0:0:0: Direct-Access USB DISK 1100 PQ: 0 ANSI: 4 sd 0:0:0:0: [sda] 15730688 512-byte logical blocks: (8.05 GB/7.50 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: Attached scsi generic sg0 type 0 sd 0:0:0:0: [sda] No Caching mode page present sd 0:0:0:0: [sda] Assuming drive cache: write through sd 0:0:0:0: [sda] No Caching mode page present sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sd 0:0:0:0: [sda] No Caching mode page present sd 0:0:0:0: [sda] Assuming drive cache: write through sd 0:0:0:0: [sda] Attached SCSI removable disk
Zybo recognizes USB pen drive without problems
(3) Mount USB pen drive
zynq> mkdir /mnt/pendrive zynq> mount -w -t vfat /dev/sda1 /mnt/pendrive zynq> ls /mnt/pendrive -l total 1048576 -rwxr-xr-x 1 root 0 1073741824 Apr 28 2016 largefile
(4) Test read speed (file of 1 GByte is present on USB pen drive "largefile")
zynq> dd if=/mnt/pendrive/largefile of=/dev/null bs=8k
(5) After few seconds USB pen drive disconnects ...
usb 1-1: USB disconnect, device number 2 sd 0:0:0:0: Device offlined - not ready after error recovery dd: /mnt/pendrive/largefile: Input/output errorsd 0:0:0:0: [sda] Unhandled error code sd 0:0:0:0: [sda] Result: hostbyte=0x05 driverbyte=0x00 sd 0:0:0:0: [sda] CDB: zynq> cdb[0]=0x28: 28 00 00 20 8d 17 00 00 10 00 end_request: I/O error, dev sda, sector 2133271 sd 0:0:0:0: rejecting I/O to offline device sd 0:0:0:0: [sda] killing request sd 0:0:0:0: rejecting I/O to offline device sd 0:0:0:0: rejecting I/O to offline device sd 0:0:0:0: [sda] Unhandled error code sd 0:0:0:0: [sda] Result: hostbyte=0x01 driverbyte=0x00 sd 0:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 20 8d 27 00 00 f0 00 end_request: I/O error, dev sda, sector 2133287 usb 1-1: new high-speed USB device number 3 using xusbps-ehci usb 1-1: device descriptor read/64, error -110 usb 1-1: device descriptor read/64, error -110 usb 1-1: new high-speed USB device number 4 using xusbps-ehci usb 1-1: device descriptor read/64, error -110 zynq> usb 1-1: device descriptor read/64, error -110 usb 1-1: new high-speed USB device number 5 using xusbps-ehci usb 1-1: device not accepting address 5, error -110 usb 1-1: new high-speed USB device number 6 using xusbps-ehci
The USB pen drive becomes unresponsive
What might be the problem ?
It never occurred to anyone ?
Thanks very much.
debugasm
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.