AnsweredAssumed Answered

STM32F042K6 USB init. for VCP com. - "This device cannot start (code 10)"

Question asked by wane.jan on Jan 15, 2015
Latest reply on Jan 15, 2015 by wane.jan
Hi all,

I have a problem with USB initialization for VCP communication using STM32F042K6. I used STSW-STM32092 package for F072 (Virtual_COM_Port file).  I create my own board at this moment mounted on breadboard - 2x33
µF for XTAL (not have 5-20µF) .

Firstly there was a problem in function USBD_Init -> DCD_DevConnect -> *BCDR|=BCDR_DPPU - enabling pull-up resistor on USB DP line - always got into HardFault_Handler, therefore I add external 1k5 resistor and now the device is recognized as FS device in my Win7 as intended, but still shows "This device cannot start (code 10)".

What I have already tried: 

•  I changed startup file for appropriate.
•  I tried to change the value of Stack_Size and Heap_Size.
•  I tried increasing & decreasing values in usbd_conf.h, usb_conf.h:
Endpoint IN & OUT Packet Size, max string
Descriptor Size, number of Endpoints used by the device etc.
•  Clock setting is configured (LEDs blink).

So my question is, what should I do to figure it out? Secondly, why there is the problem with enabling pull-up on DP line? Thanks in advance.