AnsweredAssumed Answered

STM32F4 Discovery OTG FS Device Issue

Question asked by TheMeerd on Apr 6, 2014
Latest reply on Apr 6, 2014 by Chinzei.Tsuneo
Hello Everyone,

I am trying to send and receive data on STM32F4 Discovery over USB. USB is configured as Virtual Com Port (CDC) and running at full speed. STM32CubeMX is set up on my machine and the project that I have been using was generated by this software. I only added a few lines of code inside CDC_Receive function that is seen below:

uint8_t receiveBuffer[512];
uint8_t *receiveBufferPtr = &receiveBuffer[0];

static int8_t CDC_Receive (uint8_t* Buf, uint32_t *Len)
   int i;

   for (i = 0; i < *Len; ++i)
       *receiveBufferPtr++ = Buf[i];
  return USBD_OK;

With the help of a terminal software I am sending characters to the device. In the first keyboard hit, CDC_Receive is being called. However, after receiving the first character, somehow the device stops getting data. No interrupt is coming for EP1 anymore. 

My test machine is Win7 x64 and STMicroelectronics Com Port driver is installed.

What might be the issue?

Any help is appreciated. Thanks in advance.