AnsweredAssumed Answered

USB device not enumerating sometimes

Question asked by prodey on Jan 6, 2015
We are using STM32L151CBU6 in our product development and need to connect the device to PC over USB. I have used the USB driver provided by ST. I am seeing a really strange and frustrating behavior. From the IAR debugger, I can single-step and see that the USB driver works perfectly and the device also enumerates. But sometimes, when the USB cable to PC is unplugged and plugged back in, the device fails to enumerate. Again, after a few retries of plugging out and plugging in, the device enumerates. Even while debugging using JTAG, the behaviour is same and sometimes, the device fails to enumerate. I have tried this with multiple hardware boards and this is repeatable. I have a few questions:
1) Has anyone faced such issue and found a solution?
2) I am using the internal pull-up by setting the PU bit in SYSCFG (and the bit is set as expected by the driver). Should I be using external pull-up and is there a known difference between using the internal vs external pull-up?
3) I am using Windows 7. Are there any Windows services that may be preventing the device enumeration (though I tried killing a few services without any success).

Thanks in advance.