cancel
Showing results for 
Search instead for 
Did you mean: 

How to Disable USB OTG??

Rogers.Gary
Senior II
Posted on November 07, 2015 at 00:27

After my device boots up, it detects the USB OTG and writes the required data to it. After the file closes, I will signal the user to remove the device with an LED on the PCB and wait in a loop, then want the USB OTG to be disabled. I see no way how to accomplish this. There seems to be no user control to stop the USB OTG. I am using PA.8 to drive an STMPS214 switch for +5V to VBUS. Afer detecting that the write was successful, I set the VBUS pin low and try disabling the interrupt (NVIC_DisableIRQ( OTG_FS_IRQn)  but the OTG seems to have it's own agenda, it exits the while(1) loop for writing and after the code enables the WDT and other stuff, the system resets and it cycles over again.

There seems to be no call to deinitialize, or disable interrupts that can be user accessed.

Any suggestions or help would be *appreciated* greatly.

0 REPLIES 0