cancel
Showing results for 
Search instead for 
Did you mean: 

I setup USB Host using STM32CubeMx. How can I receive data using USB Host and the USBH_CDC_Receive function and the CDC_ProcessReception(phost) ?

Daniel Hailu
Associate II
Posted on August 21, 2017 at 15:17

I have setup the USB Host using the STM32CubeMx and I can transmit data in bulk and it has a state machine.  The USB is attached to the host which is a CDC USB Modem.  The CDC_ProcessReception(phost) does not receive data through the pipe and it gets into the CDC_RECEIVE_DATA_WAIT state and gets suck without any data received. The USBH_CDC.c file has the transmit and receive function which uses a state machine and

case CDC_TRANSFER_DATA:

CDC_ProcessTransmission(phost);

CDC_ProcessReception(phost);

break;  

The ProcessTransmission function works for me but not the ProcessReception(phost)?  How can I get to receive data?

#usb #usb-cdc #usb-modem #stm32cubemx #usb-host #usb-receive
1 REPLY 1
Daniel Hailu
Associate II
Posted on August 21, 2017 at 22:49

I think the problem is that the USB is connected using CDC but has 6 virtual com ports for the USB Modem. How can I select the specific virtual COM port using the USB Host and CDC library the comes with SMT32CubeMx ?