cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 USB OTG Enable/Disable

saviphagura
Associate II
Posted on April 19, 2014 at 08:17

Hey guys,

I'm trying to disable the USBH for the F4 board after calling the ''USBH_Init'' function. Once initialized, it interferes with a connected LCD (timing issues I believe).

I have tried ''USBH_DeInit'' but with no luck. Basically, I need to disable the USB OTG, send data to the LCD, and re-enable. Sorry if this is something very simple and I am just missing it; I have been working on a project for a while now and am stumped on some things.

Any help would be greatly appreciated,

Thanks.

4 REPLIES 4
chen
Associate II
Posted on April 22, 2014 at 17:55

Hi

It would help if you told us which driver software you are using?

The old OTG library code has

USB_OTG_BSP_DisableInterrupt()

USB_OTG_BSP_EnableInterrupt()

Do not know if the new Cube code generator will create these.

Shail Shah
Associate II
Posted on August 03, 2017 at 05:59

Hello,

   We are also facing the same problem. How to re enable USB Device and HOST after de-initialize? Code is using the HAL Library.Which function call require to make in sequence?

Chip: STM32Fxxx

Thanks and Regards,

Shail Shah

Arsenii Soitu
Associate II
Posted on October 02, 2017 at 12:59

Hello! 

Was the problem fixed? I am facing the similar problem with Usb de-initialization

Shail Shah
Associate II
Posted on October 13, 2017 at 06:43

Hello,

Kindly reinitialize the state, type and your USB class and start library once again and check it.

Call USHD_Init() and after that call this function MX_USB_DEVICE_Init once again with necessary changes.

Thanks and Regards,

Shail Shah