Skip to main content
saviphagura
Associate II
Apr 19, 2014 6:17 AM UTC
Question

STM32F4 USB OTG Enable/Disable

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.

    This topic has been closed for replies.

    4 replies

    chen
    Associate II
    Apr 22, 2014 3:55 PM UTC
    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 III
    Aug 3, 2017 3:59 AM UTC
    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
    Oct 2, 2017 10:59 AM UTC
    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 III
    Oct 13, 2017 4:43 AM UTC
    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