cancel
Showing results for 
Search instead for 
Did you mean: 

Over-current indication on USB host on STM32F2xx

DZado.2
Associate

Hello, I am using the STM32F2xx ev board to develop a simple application that utilizes the USB port as a HOST. I would like to check if a device has been connected to the port and it causes over-current on the USB.

Looking into the source code, It seems that the USB_OTG_HPRT_POCCHNG bit indicates over-current. Is this correct?

Would someone guide me how to get this indication in my application?

Thanks

1 REPLY 1

As many of the OTG module's features, also this bit (together with the related POCA flag) is entirely undocumented. IMO best treated as nonexistent.

The RM/DS indicates, that you have to use an arbitrary GPIO/EXTI pin as input from an external overcurrent detector. I doubt there is any support for this in the Cube USB stack, but I also don't use it.

JW