2025-02-26 6:33 AM - edited 2025-02-26 6:42 AM
I have an application with STM32F4 OTG configured as USB Host, MSC, using ST's USB Host middleware and FatFS. How should it respond to rising and falling edges on the OverCurrent signal, such as pictured below (from the STM32F429I-DISC1 schematic)?
CubeMX config:
2025-02-26 6:52 AM
The USB spec requires that power is cut in response to an overcurrent condition.
2025-02-26 9:26 AM
Which USB spec and what section? If you know.
How would I cut the power? Release the EN' pin on the STMPS2141STR (set OTG_FS_PSO high)? Does the STMPS2141STR not protect itself and recover sufficiently without this? If I disable the STMPS2141STR, how do I know when it's safe to re-enable? Would I have to just periodically try enabling it again, and check its FAULT' pin (OTG_FS_OC) status?
What about handling the failure in the application, and disabling and potentially resuming USB & MSC operation, without rebooting?