STM32 USB CDC problem
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.
Thanks