AnsweredAssumed Answered

STM32Cube USB Host : device disconnection not detected !

Question asked by Mr Bluexav on Dec 10, 2014
Latest reply on Dec 14, 2014 by Mr Bluexav
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

Outcomes