Getting stuck with USBH_BUSY in the USBH_Process() function for USB Host MSC Project
CONTEXT:
I have been working with an STM32F429ZI Nucleo, trying to connect a USB thumb drive, to update the user application firmware. I have started with the MSC_Standalone project as it exists as an example for the F429ZI and I have been integrating relevant files from a firmware upgrade project (FWupgrade_Standalone) available for other controllers. I have not been using the Adafruit TFT shield, which the example relies on, and have removed/modified code related to it.
PROBLEM:
From my while(1) loop in main.c I'm calling the USBH_Process() function in the usbh_core.c file, and I am getting stuck with USBH_BUSY in the HOST_CLASS_REQUEST case. I followed the function calls down through the layers, and have found while debugging in the USBH_HandleControl() function (in file usbh_ctlreq.c) that the condition required (URB_Status == USBH_URB_DONE) to set the status to USBH_OK is true, yet it never enters the conditional code to set the status to USBH_OK.
URB_Status = USBH_LL_GetURBState(phost , phost->Control.pipe_out);
if (URB_Status == USBH_URB_DONE)
{
status = USBH_OK;
phost->Control.state = CTRL_COMPLETE;
...}
And so my usb host never reaches the HOST_CLASS case which I need to start any downloading function.
Does anyone know something I could try, or what I might be doing wrong?
