Question
USBD_DeInit does nothing? How can I turn off USB?
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