AnsweredAssumed Answered

Question about USBH_BulkReceiveData() Usage

Question asked by kroesswang.thomas on Oct 23, 2012
Latest reply on Oct 23, 2012 by Makhrov.Dmitri

I'm currently working on a project using the STM32F4 Discovery board as a CDC-Host. I have succesfully enumerated my usb device and also successfully used USBH_BulkSendData().

But now I'm unsure about how to use USBH_BulkReceiveData() correctly. Do I have to execute it before polling (HCD_GetURB_State(pdev , MSC_Machine.hc_num_in) == URB_DONE), or do I have to poll before executing the receive-handle?
When I execute USBH_BulkReceiveData() first, the STM32 goes into an infinite USB-interrupt loop. But when I poll first the URB_State always stays URB_IDLE.

I have studied the MSC Host example file but it doesn't provide an answer to my question.