AnsweredAssumed Answered

CubeMX - STM32L1 USB CDC

Question asked by GeorgeP on May 12, 2015
Latest reply on May 15, 2015 by Mikk Leini
Hello,
I have set up a CubeMX project with USB FS and CDC enabled. The device is STM32L151CCT6.
Also, I have installed the VCP 1.4.0 drivers for Win7 (x64).
When I start the debug session (IAR 7.40), Windows complain that the device is unknown and of course is not shown on the COM port list.
Moreover I use the following code in my USB gatekeeper thread, to avoid illegal usage of the device:
while (hUsbDeviceFS.dev_state != USBD_STATE_CONFIGURED)
{
    osThreadYield ();
}


but it never goes through that check. The dev_state always evaluates to USBD_STATE_DEFAULT.

Any thoughts? Thanks!

Best regards,
George

Outcomes