General Category > Discussion - Software
V2DIP1-32 SPI2DSC example USB_HOST never enumerated
jney:
Hello,
I'm using the V2DIP1-32 development module with the VNC2 debug module.
I want to implement a data transfer between SPI and USB mass storage.
Unfortunately the SPI2DSC example (https://www.ftdichip.com/Support/Documents/AppNotes/AN_186_VNC2_SPI_to_USB_Memory_Bridge.pdf) does not recognize my USB device.
It does not get out of the loop in line 273 of SPI2DSC.c where checking usbhost_connect_state:
--- Code: ---while (usbhost_connect_state(hUSBHOST_1) != PORT_STATE_ENUMERATED)
--- End code ---
I've tried two different FAT32 USB Sticks, both with the same result.
Best regards
Jonas
FTDI Community:
Hello,
Looks like the firmware cannot enumerate the USB driver.
The Vinculum firmware support BOMS devices formatted in FAT12, FAT16 or FAT32 file systems only where the sector size is 512 bytes.
You can determine the sector size by entering the following command into a windows command promt:
wmic DISKDRIVE get bytespersector, caption
Data displayed:
BytesPerSector Caption
512 TOSHIBA DT01ACA050 SCSI Disk Device
512 SanDisk Cruzer Blade USB Device
Best Regards,
FTDI Community
jney:
Hello,
Thanks for the fast responds.
I just had a look and both my USB Sticks are using 512 Bytes per Sector.
What else could be the problem?
FTDI Community:
Hello,
Can I get you to try the following files in your project to see if they help?
BOMS files
Some instructions:
Replace the “.a” files in
C:\ProgramData\FTDI\Vinculum II Toolchain\Firmware\Drivers\lib
and the “.h” files in
C:\ProgramData\FTDI\Vinculum II Toolchain\Firmware\Drivers\include
Unfortunately if these do not help it may indicate the enumeration issue could be related to the USB drives hardware.
Flash drives are a commodity product and are designed as such, often you find these are not designed to the applicable specs.
It may be worth using flash drives you can guarantee from the manufacture which are designed to a standard with proper bill of materials control. And which would guarantee that their devices were identical and would work the same throughout the lifetime of the product.
Best Regards,
FTDI Community
jney:
Hi,
I've tried what you suggested but without success.
However, I've solved the problem.
Seems like the SPI USB bridge example is not designed for the V2DIP1-32 Evaluation Board.
To make it work I had to change the code to use the second USB device.
Changing
--- Code: ---usbhost_init(VOS_DEV_USBHOST_1, -1, &usbhostContext);
--- End code ---
to
--- Code: ---usbhost_init(-1, VOS_DEV_USBHOST_1, &usbhostContext);
--- End code ---
solved the problem.
Navigation
[0] Message Index
[#] Next page
Go to full version