cancel
Showing results for 
Search instead for 
Did you mean: 

USBD_DeInit does nothing? How can I turn off USB?

denis239955
Associate
Posted on October 16, 2014 at 20:44

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;

}

#usbd_deinit-usb-off
1 REPLY 1
Posted on October 17, 2014 at 16:12

Hi,

I'm not sure I fully understand your problem. Could you provide a little more information (MCU, FW...) about the issue you’re experiencing so we can better explain it to our development team? 

Regards,

Heisenberg.