USB Host PROBLEM usb power led off when I run application
Hello all !
I try to develop some usb host application. Just for a test, I write simple code. In usb_host.c file
under static void USBH_UserProcess (USBH_HandleTypeDef *phost, uint8_t id) function
case HOST_USER_DISCONNECTION:
Appli_state = APPLICATION_DISCONNECT;
HAL_GPIO_WritePin(LED_GPIO_Port,LED_Pin,GPIO_PIN_RESET);
break;
case HOST_USER_CLASS_ACTIVE:
Appli_state = APPLICATION_READY;
HAL_GPIO_WritePin(LED_GPIO_Port,LED_Pin,GPIO_PIN_SET);
break; When I insert my usb disk, I expected to see my on board led to be on and when I remove my usb disk, my board led will be off. But it doesn't work and I realized LD7 (usb power led) is being off small amount of time after I run the code. You can see my cubemx configuration and STM32F4DISCOVERY OTG schematic on below. I'm pretty sure that I correctly selected everything to run this app. USB_HOST library created by Cube MX, What could be wrong?? My Firmware package version FW_F4 V1.26.2 on cube mx




