Skip to main content
bluexav
Associate II
December 10, 2014
Question

STM32Cube USB Host : device disconnection not detected !

  • December 10, 2014
  • 1 reply
  • 753 views
Posted on December 10, 2014 at 19:10

Hello !

I'm trying to write a MIDIstreaming class host driver based on the CDC example.

First detection of the device and class initialisation work at boot and after boot.

But the disconnection and reconnection of the device are never detected.

I saw that HAL_HCD_Disconnect_Callback in usbh_conf.c is never called !

I've managed to make the audio player/recorder example work without any problem. I can plug and unplug the USB thumb drive and then application restarts.

The strange thing is that if the application function is disabled in the main loop, the disconnection event won't be sent anymore.

The USBH_Process(&hUSBHost) function (in main loop) and USB interrupts routines should manage connection/disconnection of the device, shouldn't it ?

I've also read some people have a similar problem with CDC host...

Thanks in advance for your help !

board : STM32F4 Discovery

firmware : STM32CubeF4 v1.3

compiler : ARM Embedded Gnu Tools 4.8 2014q3
    This topic has been closed for replies.

    1 reply

    bluexav
    bluexavAuthor
    Associate II
    December 14, 2014
    Posted on December 14, 2014 at 01:07

    SOLVED !

    I had forgotten to implement the SOF process function (just returning USBH OK !).