2024-05-27 03:27 PM
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
Solved! Go to Solution.
2024-05-27 04:13 PM - edited 2024-05-27 04:18 PM
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.
2024-05-27 04:13 PM - edited 2024-05-27 04:18 PM
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.
2024-05-27 04:38 PM
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
2024-05-27 05:02 PM
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.
2024-05-27 05:37 PM
Thanks a lot ! I was probably wondering too much for too little then 🙂
Thanks again and have a nice day