1 of 1 people found this helpful
Hello David Gabbay,
The downstream ports are powered ON/OFF through the nENP# pins which are connected to the downstream devices through a power switch. Please refer to the below link for the reference design of HX2VL.
Please feel free to write back in case of any queries.
In that case I believe that the best scheme is to add a simple USB MCU on the upstream hub that will be addressed by the host to control the Vcc of each of the downstream ports through the Input pins - Must use the 48 pin device for this.
An MCU can be added to enable/disable the power supply to the downstream devices.
But, in order to disable a downstream device, the device manager on the host can be used to enable/disable, which will be the simplest way to implement the same. Please let me know if you would want to remove the power supply to the device or just disable it.
The nENP# pins are generally used together with the over-current protection pins and are used to switch the power ON/OFF to the downstream devices.
I need to place the Vcc of each downstream port individually at 0V by command from the Host. And I need to Identify each hub in someway uniquely so I can know which hub and which port is activated from the host. I prefer not to add another MCU to the custom hub design if you can explain how to accomplish these goals without.
I am designing a custom hub with 8 Vcc controlled downstream ports, and 1 uncontrolled downstream (chaining) USB port. I was thinking of a 1 Hub chip (upstream) driving two Hub (downstream) chips with one of the remaining ports of the Upstream hub used as the chaining port. I can then connect my USB MCU to the remaining port of the Upstrem HUB so It can be accessed on the same USB interface and be used to provide Unique ID and control the Vcc of the 8 downstream ports.
I am very confused by your data sheet
On the one hand it refers to "SetPortPower" command that can power each port - but it does not explain how to send that command and where to send it. It sounds like it should be possible to switch the downstream port Vcc pin to 0V from the data sheet:
"After enumerating, the host may power each port by sending a SetPortPower request for that port. Power switching and
overcurrent detection are managed using respective control signals (PWR#[n] and OVR#[n]) which are connected to an
external power switch device. Both High/Low enabled power switches are supported and the polarity is configured through
GPIO setting, see Pin Configuration Options on page 17
"When the hub is configured, the ports are not driven and the host may power the ports by sending a SetPortPower command for each
port. After a port is powered, any connect or disconnect event is detected by the hub. Any change in the port state is reported by
the hubs back to the host through the Status Change Endpoint (endpoint 1)."
It seems that the SetPortPower can disable the port Vcc along with the Data (Ok with me).
But it is unclear
- How and where to send that command from the Host
- How to identify the specific downstream port of a HUB using this command.
Your question regards to the behavior of USB HUB driver on host side
This driver is provided by Intel/AMD( if you use Win7 or previous OS) or Microsoft.(Win8 and Win10).
This driver will be responsed to communicate with any HUB which is connected to PC.
To make a tool in order to talki to a HUB, for example, you need to learn how to write a filter driver.
You could refer to the links below to know what filter driver is.
In addition, this is exactly what BUS HOUND done
For other question, you need to read the chapter 11 of USB2.0 spec.
Thanks for responding on this issue.
I am using a Linux based system and using HIDraw usb low level interface to control 32 USB downstream devices. I would like to selectively and individually shut the power (20mA max) to each of them. This is not a general purpose application - it is a custom application, the hubs are used inside the equipment. we will be using a 1:8 arrangement using 3 Hub chips and I need to identify each downstream port.
Can you point to a document specifying what are the hex codes for SetPortPower commands to the Hub chips?
Can the host store a differrent ID code (like a serial number) inside each Hub chip so that it can uniquely identify each of them?
Sorry for the late reply.
For the first question, you could refer to USB spec 2.0 or 3.0. Both of them provide one separate chapater to cover the HUB devices. You could send SetPortFeature to the HUB to enable/disable the power of one specific port.
For the second question, you could extract the description file to find any different information between these hubs in order to differ them.
I post the link of UsbTreeView to let you know which information host could get from a HUB.
After downloading this tool, you could check the devices which connnect to PC and all the related information.
Thanks for your response yyca,
I've been trying to interrogate (using the control interface with a number of C++ codes) the hubs that are connected to my PC. This revealed several issues with the HUB identification scheme. I could not access the webpage you indicated for the tool - I will try later again.
1. I can only detect USB root hubs and devices connected to the USB bus BUT not in-between hubs. (if a hub is connected to the root hub it is not identified even if there is an operating USB device connected to it. lsusb shows it as a device off the root hub tree.
2. Since all the hubs that will be chained in our design would be the same make and chip we will not have identifying distinct information to go by.
3. Following your comments I experimented (see 1) with several hubs that I have lying around from different mfrs I was hoping to find a PPPS enabled commercial HUB and save myself the effort of designing a hub. So far unsuccessful. - I will try with the tool you posted.
I also try to click the link which I paste in my answer. However, I could not access either.
I content of the link is correct but the website is not correct. I suspect there should be some problem with Cypress's community.
Well, you could just search "USB device tree view" in Google. The first result should be the right one.