2018-03-02 02:49 AM
For both USB OTG FS and HS controller the CIDSTS bit in the GOTGCTL register does not reflect the status of the USB port. When pulling the ID line low or leaving it in floating state the register value changes, but CIDSTST always remains set regardless of the ID state.
With floating ID line the register value is: 0x004C10000
When pulling ID low the value changes to: 0x03010000
If the ID port pin multiplexer is not set to alternate function USB FS / HS, the register value does not change at all. This makes sense, since the voltage level is not changing anymore. So obviously the ID line changes 'something' (undocumented reserved bits) but not the CIDSTS bit, as expected.
Is there any special configuration required to make use of the ID line detection feature ?
Hardware / software platform used:
STM32F756-EVALCMSIS v5.3.0MDK-Middleware V7.6.0uVision V5.25 Pre22018-03-02 02:01 PM
CIDSTST does not indicate directly the status of the ID pin; it is subject to 'forced state' when one of the OTG_GUSBCFG.FDMOD or .FHMOD are set.
JW
2018-03-04 11:50 PM
Thanks for your response, since I am using the MDK Middleware with CMSIS drivers (host and device implementation are separated) this explains the behaviour. Is there any other possibility to determine the ID pin status than reading the GPIO value if FDMOD or FHMOD are set (by the CMSIS driver) ?