2021-03-30 11:25 AM
I a wondering if it is possible to setup the host without VBUS and ID pin assigned. I would like to use USB A type (like laptops have) socket - there is no ID pin available and I do not VBUS detection as it is always ON.
Solved! Go to Solution.
2021-03-30 12:14 PM
Is it possible to set up USB HOST without VBUS and ID pins? Yes.
Is it possible to set up the Cube's USB HOST stack without those pins? I don't know, I don't use Cube. Maybe not by clicking in CubeMX, but it's certainly possible to find the places in that stack where these pins are used and modify them as needed - Cube is open source.
I would be surprised if Cube would do anything with ID beyond initializing the pin. Last time I checked (and I admit it was a couple of years ago) there was no OTG support in Cube, and HAL_HCD_Init() directly set OTG_GUSBCFG.FHMOD without further ado.
The OTG's dedicated VBUS pin is not needed for HOST at all, it's again an OTG feature.
UM1720 mentions a switch (notoriously called "charge pump") for the VBUS supply, that's a GPIO which may be switched on upon some action; again, I am not interested enough to dig deep.
JW
2021-03-30 12:14 PM
Is it possible to set up USB HOST without VBUS and ID pins? Yes.
Is it possible to set up the Cube's USB HOST stack without those pins? I don't know, I don't use Cube. Maybe not by clicking in CubeMX, but it's certainly possible to find the places in that stack where these pins are used and modify them as needed - Cube is open source.
I would be surprised if Cube would do anything with ID beyond initializing the pin. Last time I checked (and I admit it was a couple of years ago) there was no OTG support in Cube, and HAL_HCD_Init() directly set OTG_GUSBCFG.FHMOD without further ado.
The OTG's dedicated VBUS pin is not needed for HOST at all, it's again an OTG feature.
UM1720 mentions a switch (notoriously called "charge pump") for the VBUS supply, that's a GPIO which may be switched on upon some action; again, I am not interested enough to dig deep.
JW
2021-04-02 03:00 AM
Thanks @Community member , I confirm it is possible to configure USB host on L476 & L496 without any additional pins required (ID & VBUSx2).
I tested it on Nucleo-L476RG and L496-Disco with very little extra added(just in USB_host.c) to automatically generated code. Instruction how-to: http://evenlund.blogspot.com/