Skip to main content
soobia
Associate II
June 25, 2014
Question

How to disable USB port through software

  • June 25, 2014
  • 1 reply
  • 722 views
Posted on June 25, 2014 at 12:46

Sir,

I have successfully initialized USB port on Hi mini STM32F1V board now I would like to design a software routine to disable the initialized USB port plz help me out how to implement this.

Regards 

#stm32f1-usb-port-programming
This topic has been closed for replies.

1 reply

joe
Associate III
June 26, 2014
Posted on June 26, 2014 at 11:00 I haven't done this but this is how I would approach it. The initialization is done by calling the function,MX_USB_HOST_Init(). This function calls

USBH_Init(&hUsbHostFS, USBH_UserProcess, HOST_FS);

The is a matching USB_DeInit function:

USBH_DeInit(USBH_HandleTypeDef *phost)

to which you would passhUsbHostFS. Then you can re-assign your USB GPIO's as required. Worth a try.