Hello,
I'm working on a project that's using code largely based on the host_hid_generic_freertos example to read from an HID device. I'm fairly consistently running into a situation where the callback provided to USB_HostInit will be given the error code kUSB_HostEventEnumerationFail, with the failure reason being given as kStatus_USB_TransferFailed. The occasional enumeration failure isn't a big deal, however the problem seems to be that the driver will not recover from this failure. The host driver we're using is the ip3516hs driver.
One thing we're doing that wouldn't be in the original example is removing VBUS power in between enumeration attempts to save power. I couldn't find anything saying this would be a problem, but I figure it might be and is worth mentioning. This will typically work for a while though, and provide the desired effect of allowing the device to enumerate and communicate and then we can shut off power to force a detach.
Broadly my question is, does it sound like we're doing anything wrong? And furthermore, what is the correct way to reset the driver such that we can bring it up with a clean start every time we want to communicate with a device?
Hi
According to DS, VBUS must be connected to supply voltage when using the USB peripheral.
That's to say, If we use USB as host, it's necessary to connect USB1_VBUS. It is 5 V tolerant when
USB1_AVDD3V3 and USB1_AVDDTX3V3 = 0 V.
Enable this pin is for correct host operation.
Thanks,
Jun Zhang