AnsweredAssumed Answered

STM32 USB CDC problem

Question asked by hosseinzadeh.mohamma on May 30, 2017
Latest reply on May 31, 2017 by hosseinzadeh.mohamma

hi everybody

I'm using stm32l151 and I want to use usb peripheral in cdc mode. I used stm32 cubeMx to generate the project.

when I connect the boar to PC, I can see the VCP in device manager. however I can't sen any data to PC. The function CDC_Transmit_FS() always return USBD_BUSY.

can anyone help me?

Here is my code:

while (1)   {     CDC_Transmit_FS(Buffer, 6);     HAL_Delay(2000);    }

I only added the above code to the project created by STM32cubeMX but it didn't work.