2015-01-15 03:39 AM
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.Jan #stm32f0 #vcp #cdc #usb #stm322015-01-15 04:31 AM
I had the same problem
Tip:Connect a serial USB on your computer that recognizes(As a USB-Serial cable for example)And see which Windows driver that it uses.(In my case was Serenum.sys rather than Usbser.sys)See my topic:https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fcortex_mx_stm32%2fSTM32F103RBT6%20-%20USB%20DRIVER&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&TopicsView=https%3A%2F%2Fmy...Then locate the file (.inf) normally in:C: \ Program Files \ STMicroelectronics \ Software \ Virtual COM Port Driver \ stmcdc.infEdit the file by changing the name (Usbser.sys) the driver recognizes.Try adding the new driver in Device Manager.Add new legacy driver and locating the file (stmcdc.inf) modified.2015-01-15 05:48 AM
Thanks for response. I tried both available versions of VCP driver (v1.3.1 and v1.4.0) for my 64bit Win7.
I am not sure I understand the ''adding a new legacy driver with the *.inf file''.
I renamed all of usbserto
serenum, then
I uninstalled the driver in Device Manager and re-pluged the usb connection -> then automatic driver instalation launched,
but finally message
''Device driver software was not succesfully installed'' showed up. So I still think it's the code matter.