cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 downstream of a USB hub

4lch
Associate II

Hi !

An application I am working on has a PC connecting to an ethernet device (currently through Ethernet) and a STM32 (STM32G0B0CET6) through USB.

I am looking to only have one connection to the PC through USB, hence I am looking to have the incoming USB plug into a hub, going to the STM32 on one side and a USB-Ethernet bridge on the other. All devices are self-powered (not through USB) and the STM32 does not have to talk to the other device at all. The USB hub I am looking at is Microchip's USB2412.

I am mainly wondering if there is a "standard" way to make sure the STM32 will enumerate fine through the USB hub as I am not too familiar with USB. It looks like the hub has pins that can signal that it is ready and enumerated, and it looks like downstream devices should only boot after this is the case in order to enumerate. Perhaps it would be possible to instead hook this signal to the RESET pin on the STM32 ?

Thanks a lot in advance !

 

Best regards,

Adrien

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

STM32 in a role of USB device should be compatible with hubs, should reset and enumerate without problems. Handling of the hub (detection of connected devices etc.) is responsibility of the PC.

Self-powered devices can boot before USB connection, detect the connection when (if) it is done and stay running after disconnect. This is normal. The USB reset signaling does not cause reset of such devices, it is handled by the USB software of the device. No extra wires/pins to hook.

Here you can find help with all aspects of your STM32 project.

 

 

 

 

View solution in original post

4 REPLIES 4
Pavel A.
Evangelist III

STM32 in a role of USB device should be compatible with hubs, should reset and enumerate without problems. Handling of the hub (detection of connected devices etc.) is responsibility of the PC.

Self-powered devices can boot before USB connection, detect the connection when (if) it is done and stay running after disconnect. This is normal. The USB reset signaling does not cause reset of such devices, it is handled by the USB software of the device. No extra wires/pins to hook.

Here you can find help with all aspects of your STM32 project.

 

 

 

 

4lch
Associate II

Thanks Pavel for taking your time with my question :)

It is good to know that nothing specific should be needed in this case then, I was probably confused by the designs I could find from hubs that do sequence power, probably in bus-powered mode.

 

Just to confirm, even if the USB is plugged before booting, the bus and devices could power on in any sequence depending on converters etc and still enumerate fine, as well as everything could already be powered up before plugging the USB in, and still work with no need for resets or anything ?

 

This is very helpful so thanks a lot !

Best regards,

Adrien

Pavel A.
Evangelist III

Yes  the bus and devices could power on in any sequence. Self-powered device controls when it becomes visible to the host/hub. The USB reset signaling is just a special signals sequence on the USB data lines, it does not cause hardware reset of the device.

 

Thanks a lot ! I was probably wondering too much for too little then :)

 

Thanks again and have a nice day