1 of 1 people found this helpful
If you want to have your Edison module as the USB Host device, you have to pull down the USB ID pin.
Regarding the USB data pins (D+ and D-), you have to connect the D+ of your Edison (Host) to the D+ of the USB device, in this case the USB Hub circuit, and the D- of your Edison with the D- of the USB device.
Regarding the FAULT and PSW pins. They are used to control the external power switch and monitor the overcurrent condition on VBUS. The FAULT pin is an input pin, and the PSW pin is an output pin. The FAULT pin has to be pulled up, and the PSW pin can be left floating, however I recommend you to use a pull down resistor instead.
Anyhow, I recommend you to check the Arduino expansion board or the Mini-Breakout board schematic to get a better idea on how the PSW and FAULT signals should be connected. It's very useful to check these schematics when designing a custom board because you can check how the interfaces are connected.
- Arduino expansion board schematic: http://www.intel.com/content/www/us/en/support/boards-and-kits/000005829.html
- Mini-Breakout board schematic: http://www.intel.com/content/www/us/en/support/boards-and-kits/000005699.html
Yes it was useful.
I will base my design on your answer and report back if there are any issues with the prototype.
I've built my first prototype and sadly it didn't work out of the box.
I've flashed edison with the latest update via the installer.
The module is mounted on my prototype card.
I can connect to it through the UART2 pins that I connected to a breakout board connected to the PC.
From the command line I get this output.
unable to initialize libusb: -99
The USB_ID pin and it is connected directly to ground.
I've not checked the D+/D- in detail but I assume that is a secondary issue once the host mode is working.
The PSW pin is free.
The FAULT pin is pulled up using 10k to 1.8V (is this correct)
The g_multi modules has been removed/disabled and the module is rebooted
Module Size Used by
bcm_bt_lpm 13708 0
bcm4334x 587105 0
Still the same result from lsusb.
I know is kind of disappointed when we are working in some project and it doesn't work out of the box. I'll try to help you to see if we can find something together, but please consider that it's hard to know what might the issue is since you are using a custom setup.
My previous post is based on the way the expansion boards for Edison are designed, but I haven't tested before a custom hardware setup for the USB interface. Could you please provide the schematic of your custom board? This way I can check it and compare it with the expansion boards' schematics.
What I said about it not working "out of the box" merely a statement of fact, prototypes rarely work on first try.
I appreciate the help I can get.
This is the schematic for the Edison and the USB system.
In this first prototype the 4.5V became 3.3V, still enough for Edison but I will correct it to 4.5 in the next version.
I've tried to connect the module to the Breakout Board with the same result: lsusb return "unable to initialize libusb: -99".
This was done without USB power to not risk the device being forced to device mode by the cable.
Can the Breakout Board support the module in device mode?
I don't have an Arduino board nor do I have the special type of usb cable for device mode.
Does the error from lsusb come from the fact that the Edison module believe to be in device mode or could it be a bug in the firmware?
What can I look for?
1 of 1 people found this helpful
I've checked your schematic and the recent comment you posted. Please let me share my comments.
If you take a look at the Arduino schematic, there are two USB ports: one micro USB port used when the Edison module is the USB device, and another USB port when the Edison is the USB host. You can choose between both ports by switching a little switch available on the board. The only thing this switch does is setting the USB_ID pin to LOW when the USB port for Host mode is selected, and setting the USB_ID pin to a floating state when the micro USB port for device mode is selected. According to your schematic, the USB_ID pin is set to LOW permanently, so it should be fine if the Edison is going to be the host device.
The error message you are getting appears only when the Edison is configured as the USB device and not when it acts as the USB host. For example, in the Arduino expansion board, when the micro USB port is selected, the Edison is in device mode and you will get that error message, but if you have selected the other USB port, the Edison will be in host mode and the error message doesn't appear.
If you are using the Mini-breakout board, you have to plug in a USB micro B connector to set the module as the USB device, which will leave the USB_ID pin floating. If you connect a USB micro A connector, the module will act as the USB host because the USB_ID pin is set to LOW.
Anyhow, I'm not sure why you are getting that error message if you are connecting the USB_ID pin to LOW. I'd double check if the USB_ID pin is actually connected to GND (0V).
On the other hand, there is a note for the USB_VBUS pin in the Edison Module Hardware Guide that states the following:
"The USB_VBUS signal should be applied to pin 20. This signal is only used to alert the Intel® Edison that it has been connected to a host port. "
In your schematic, this signal is connected to 5V permanently. You could try to leave this signal floating since it is not used when the Edison is acting as host. According to the Arduino expansion board schematic, the USB_VBUS pin is connected to 5V only when the Edison is powered from the USB port and it's acting as the USB device. I have not tested this by myself, so I'm not sure if having the USB_VBUS signal set always to HIGH is preventing the Edison from acting as the USB host, but from what I've found in the Edison Hardware Guide, it could be possible that this signal is causing the issue.
Regarding the PSW, I recommend you to add a pull down resistor. It should be fine if this pin is floating, but I'd add a pull down resistor. The FAULT signal should be connected to 1.8V using a pull up resistor, so according to your schematic, that seems to be fine.
Additionally, make sure you are providing power to the USB device you will connect to the Edison using an external circuit. The Edison itself doesn't provide power when it is acting as the USB host.
I hope you find useful my comments above. They are based on the information available in the Edison documentation, but when designing a custom board there are other factors that might affect the final product like soldering components or the final state of the tracks. Anyhow, make sure everything is fine at hardware level. I'd say that the USB_VBUS pin set to 5V permanently is preventing the Edison to act as the USB host, but since I haven't tested it I cannot be 100% sure about that. So please try to test this and see if there is any change.
Thanks to you comments I got it working.
I got an USB OTG cable and tried it on the breakout board. At first it failed but after I flashed the module again it worked. Some package I previously removed must have broken it.
The same newly flashed module still generated the error on my card.
Then I cut the USB_VBUS wire as you suggested, leaving it free.
This solved the issue, the USB is now fully working. Both lsusb works and I can mount usb drives.
Thanks for your help.