cancel
Showing results for 
Search instead for 
Did you mean: 

USB over current (OTG_FS_OC) - how should application respond?

BMcDo.3
Associate III

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)?

 

BMcDo3_0-1740579195752.png

 

CubeMX config:

BMcDo3_1-1740580311315.png

 

2 REPLIES 2
TDK
Guru

The USB spec requires that power is cut in response to an overcurrent condition.

If you feel a post has answered your question, please click "Accept as Solution".
BMcDo.3
Associate III

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?