AnsweredAssumed Answered

USBD_DeInit does nothing? How can I turn off USB?

Question asked by bohm.denis.001 on Oct 16, 2014
Latest reply on Oct 17, 2014 by Montassar BEN ROMDHANE
I have the code for USB device working.  I initialize USB with USBD_Init.  My code also  needs to turn off USB completely in one mode to minimize power consumption.  I tried USBD_DeInit.  There was no change in the power consumption.  Looking at the source code USBD_DeInit does nothing.  Does anyone know how to completely reset the USB hardware back to the default state to turn USB off and minimize power consumption?

/**
* @brief  USBD_DeInit 
*         Re-Initialize th deviuce library
* @param  pdev: device instance
* @retval status: status
*/
USBD_Status USBD_DeInit(USB_OTG_CORE_HANDLE *pdev)
{
  /* Software Init */
  
  return USBD_OK;
}

Outcomes