2024-11-08 04:55 AM
Hello,
In my application USB Device, on successful enumeration, BIT13 "USB_OTG_GINTSTS_ENUMDNE"of OTG core interrupt register (OTG_GINTSTS) turns High.
As per USB2.0, if my USB Device in its Device Descriptor demands for higher power than what external USB HOST can support, the enumeration fails.
I want to know what will be the state (high/Low) for for BIT13 "USB_OTG_GINTSTS_ENUMDNE"of OTG core interrupt register (OTG_GINTSTS) in that condition.
Solved! Go to Solution.
2024-11-21 10:24 AM
Hi @krn
First, the interpretation depends on the product family in question. Messages are fully described in USB specification. The process to enumerate USB device is as follows.
Now, the implementation of ST USB library,
usbd_core and usbh_core files include the implementation of the core state machine process and the enumeration and the control transfers processing.
usbd_ctlreq and usbh_ctlreq files include the implementation of the processing of the control requests required for the device enumeration.
usbh_ioreq and usbd_ioreq files include the implementation of different USB transactions process.
In host mode:
In device mode:
USB stack ensures the correct reception and decoding of the host request and then device state modification accordingly. For further details I suggest you this interesting WIKI
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-11-08 08:25 AM
Hi @krn
When a USB device is connected, it initially draws a limited amount of power (up to 100 mA for USB 2.0).
During the enumeration process, the device sends its descriptors, including the Device Descriptor, which contains the bMaxPower field indicating the maximum power the device requires. The enum process wil lfail in case it cannot provide the requested power.
You may need to check or simply attach your USB traffic to analyze.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-11-08 09:14 AM
Thank you for your reply.
My understanding is that since enumeration fails in above case, the BIT13 "USB_OTG_GINTSTS_ENUMDNE" of OTG core interrupt register (OTG_GINTSTS) will not be set High.
Can you please comment on this ?
2024-11-13 02:06 AM
Hi @krn
This bit reflects the enumeration is done which means simply executed not necessarily successful. Only the USB stack can interpret the enumeration if it is successful or failing.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-11-15 05:35 AM
Hello,
Please can you explain how does USB stack can interpret the enumeration if it is successful or failing.
2024-11-21 10:24 AM
Hi @krn
First, the interpretation depends on the product family in question. Messages are fully described in USB specification. The process to enumerate USB device is as follows.
Now, the implementation of ST USB library,
usbd_core and usbh_core files include the implementation of the core state machine process and the enumeration and the control transfers processing.
usbd_ctlreq and usbh_ctlreq files include the implementation of the processing of the control requests required for the device enumeration.
usbh_ioreq and usbd_ioreq files include the implementation of different USB transactions process.
In host mode:
In device mode:
USB stack ensures the correct reception and decoding of the host request and then device state modification accordingly. For further details I suggest you this interesting WIKI
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.