2014-12-10 10:10 AM
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 2014q32014-12-13 04:07 PM
SOLVED !
I had forgotten to implement the SOF process function (just returning USBH OK !).