2016-05-31 12:17 AM
Hi,
In a product using an STM32F407 we use the USB interface to connect to a USB memory stick. The base of the project was generated with CubeMX.To conserve battery power, we need to switch off the USB memory device as we only write or read from it intermittently.However, we have a small problem when we power up the USB again after a while in that the USBH interface detects that a device is connected but then fails to continue enumerating the device and I never get the HOST_USER_CLASS_ACTIVE event.So far I used a timeout of 10 seconds for this to come in and then power cycle the USB port again. Then often it wakes up correctly and I get the HOST_USER_CLASS_ACTIVE within some 500ms or so.After I power up the USB I call MX_USB_HOST_Init() to what I think is to kick the USBH library and init and enumerate the device.So how I am supposed to power up the USB on demand and get it to enumerate and be ready in a reliable way without having to power cycle multiple times? #usbh-msc2016-06-06 12:12 AM
Nobody any idea as to what the proper way is to switch the VBUS on/off to a memory stick and to have it reliably detected and enumerated the next time it powers up?
2016-06-06 08:17 AM
Forums can be like empty rooms, and when there are people they are often more interested in their own problems.
So how exactly are you turning off power and tri-state the pins currently?