AnsweredAssumed Answered

STM32F3 Discovery, USB CDC bug

Question asked by shams.reza on May 21, 2015
Latest reply on May 28, 2015 by shams.reza
Hi,


I create a project using STM32CubeMx with keil MDK5. my hardware is Discovery F3 and I make a loopback just by following code:
static int8_t CDC_Receive_FS (uint8_t* Buf, uint32_t *Len)
{
  /* USER CODE BEGIN 6 */
     CDC_Transmit_FS (Buf, *Len);     
  return (USBD_OK);
  /* USER CODE END 6 */ 
}


I think there is something wrong with USB library or the code generated by the CubeMx. My problem is this code just return first character. tx routing works fine but problem is with receiving.


Another issue is when you powered up the board with debugging USB when you disconnect and reconnect USB CDC,  windows shows unknown device message on screen. I mean just for the fist time PC will recognize CDC device any reconnect after that will fail becuse there is somthing wrong in USB lib.


If anyone has experienced such problem please tell here. and if you have solved this problem please help me.


thanks in advance. 

Outcomes