USB Flash Drive not showing on PC

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
Post Reply
treverwagenhals
Senior User
Posts: 21
Joined: Thu 2018-03-01 15:45

USB Flash Drive not showing on PC

Post by treverwagenhals »

Good day all,

I remember doing this before but now I don't seem able to get my USB flash drive to show as a mass storage device on a PC using my breakout board.

I connect IOVDD to GPIO0_0 and GPIO0_1 so that the kernel knows to load configuration 5, which includes a call to USBHOST F so that the USB driver may be loaded.

Past this though, the device does not seem to show up on Windows. In most cases, it simply says that Windows is unable to determine what the device is.

Many times when I run this, the UART console does not display any information as well. It does not show the normal boot messages and instead just gives "[00][00][00]"

I had it working before in the past but can't seem to figure it out now. Is there any specific step I'm missing to make the mass storage functionality work more consistently?

Thanks in advance.
Hannu
VLSI Staff
Posts: 527
Joined: Mon 2016-05-30 11:54
Location: Finland
Contact:

Re: USB Flash Drive not showing on PC

Post by Hannu »

Hi!

This won't work. If you have BOB and USB stick connected to same USB port on the computer, there will be two hosts. The mini USB and USB-A connector are in parallel. Have a look on schematics page 2: http://www.vlsi.fi/fileadmin/evaluation ... 11-sch.pdf

If you want to access USB stick from VS1005, USBHOST is the program to use the stick, but remember to remove the mini-USB cable. If you want to access the USB stick with computer plug it to computer. To access internal flash, remove the USB stick and use mini-USB.

What you might have done, is plugged the USB stick to BOB and had the mini-USB connected. The VS1005 has been in non USB mode and it has looked to computer's USB system as very weird and bad cable. Don't Do This.

And the best way to power your BOB is to use UART cable.
treverwagenhals
Senior User
Posts: 21
Joined: Thu 2018-03-01 15:45

Re: USB Flash Drive not showing on PC

Post by treverwagenhals »

Thanks for the swift response.

Just to clarify, you are saying that is is not recommended to try to get the flash drive to pull up as a file system to read/write to through the VS1005 and it should be plugged in directly to the computer if I want to modify it?

It seemed to work quite well when I got it working in the past, even if it wasn't intentional.

Even if I don't have the UART cable connected at all, there is no intentional setup to have the USB drive show up as a system device on the PC when plugging in the miniUSB cable?

I also had been using a microUSB cable breakout that I fed the USBP and USBN pins to the header pins of the BOB and have been successful in pulling up the SPI flash with this setup, and have digital switches in place to break the connection while I am in a playing mode so that USBHOST posts correctly. With this detail, is there anything I can do to get what I mentioned working?
User avatar
Panu
VSDSP Expert
Posts: 2829
Joined: Tue 2010-06-22 13:43

Re: USB Flash Drive not showing on PC

Post by Panu »

Even if I don't have the UART cable connected at all, there is no intentional setup to have the USB drive show up as a system device on the PC when plugging in the miniUSB cable?
Do you mean connect both the PC and a USB flash memory to VS1005 at the same time? That cannot be done, because the VS1005 only has a single USB OTG port.
It seemed to work quite well when I got it working in the past, even if it wasn't intentional.
Provided that you mean the above scenario, that would be pure luck. Your PC must have quite strong USB port for it to work at all.

In the VS1010 developer board, we added a mechanical switch to switch between the USB A and USB mini AB connector to avoid this same issue. But the switch adds electrical noise so it's also not an optimal solution.

-Panu
treverwagenhals
Senior User
Posts: 21
Joined: Thu 2018-03-01 15:45

Re: USB Flash Drive not showing on PC

Post by treverwagenhals »

Do you mean connect both the PC and a USB flash memory to VS1005 at the same time? That cannot be done, because the VS1005 only has a single USB OTG port.
Yes, I used the miniUSB port and had the flash drive plugged in and was able to get the flash drive to show on my computer. It was my desktop that was capable now that I think about it, so I'll give that another try just to see what happens.
In the VS1010 developer board, we added a mechanical switch to switch between the USB A and USB mini AB connector to avoid this same issue. But the switch adds electrical noise so it's also not an optimal solution.
I just took a look at this and see the mechanical switch you mentioned. I see that it connects either the miniUSB port or the USB port to the system at a time. I understand there is only 1 USB OTG, but I figured there could be a setup where the VS1005 is bypassed completely by using the USBP and USBN header pins that are connected to the flash drive to the point where the SoCs capabilities don't even matter. Visually I pictured this as a direct connection from a new microUSB port to the USBN and USBP lines on the flash drive. So, in relation to the VS1010, it would be a third state where the mini/microUSB port and USB A port are connected directly together with the SoC tied off.

What would happen if I had my system run a configuration that did not trigger the VoMassStorage() function and did not load any drivers so that the SoC is not trying to use the USB bus? Would that still not allow a PC to talk directly to the USB flash drive? Visually I just picture that as a bus with two devices on it and one of the devices is in a high impedance state.

I suppose if the example above isn't possible, I would need to find a way to drive power to the flash drive from the microUSB without driving power to the SoC so that it doesn't also try to access the USB lines?
treverwagenhals
Senior User
Posts: 21
Joined: Thu 2018-03-01 15:45

Re: USB Flash Drive not showing on PC

Post by treverwagenhals »

Alright, so I went back and tested it again on my desktop and was able to successfully see the drive all the time.

It seemed to work in any unspecified configuration or my configuration to load USBHOST and then call VoMassStorage().

I tried it again on my laptop and it seems in most cases it doesn't work. I was able to get it to post for a few seconds on different ports but its too inconsistent.

I'm going to get a separate USB port breakout and interface that with the breakout board and try to use Diodes or a digital switch to control the USB. I would then have a configuration that the USB can still get power and interface directly with the USB port on the PC without any power to the system and see if that works as a permanent solution over just finding computers that it works on.

Thanks.
User avatar
Panu
VSDSP Expert
Posts: 2829
Joined: Tue 2010-06-22 13:43

Re: USB Flash Drive not showing on PC

Post by Panu »

Hi,

using diodes or digital switches, you may get it working in 12 mbits/s speed, perhaps even at high speed with some computers, but it will never be USB logo compliant if that matters to you...

-Panu
treverwagenhals
Senior User
Posts: 21
Joined: Thu 2018-03-01 15:45

Re: USB Flash Drive not showing on PC

Post by treverwagenhals »

Thanks for that bit of information,

I'm currently more interested in the functionality than the actual speed rating, so it's a compromise I'm willing to make in this case.
Post Reply