2015-02-02 12:22 PM
Hi, I have a problem with virtual com port driver 1.4.0. CDC devices are not recognized, when this driver is installed, but I don't have problem with the old driver (1.3.1) under Windows 7. I must be sure that CDC device will work under Windows 8.1. Where is the problem?
2015-02-03 12:21 AM
A) Clean up of old driver on Windows
1) Uninstall old ST's driver, if any Control Panel - Programs and Features - right click on ''Virtual COM Port Driver'' (STMicroelectronics) - In the InstallSheild dialog, click on ''Remove'' check box > ''Next'' button 2) Uninstall old device instances on the Device Manager Make a new text file, ''DevManager.bat'', and copy these two lines to the file. set devmgr_show_nonpresent_devices=1 start devmgmt.msc Right click above .bat file, ''run as administrator'', and the Device Manager comes up. - enable ''Show hidden devices'' on View menu Find this device instance(s), (your PC may have two or more) Ports (COM and LPT) - STMicroelectronics Virtual COM Port (COMxx) Right click on the all of instances - Uninstall 3) Clean up DriverStrore and oemxx.inf in Windows\inf folder Run command prompt under administrator privilege, copy these two lines (right click - paste) to the dialog. cd %WINDIR%\inf findstr ''VID_0483&PID_5740'' *.inf Above ''findstr'' lists up oemXX.inf (XX: number) files, which include ST's CDC VID/PID Delete these ''.inf'' files using pnputil (which deletes DriverStore and .pnf files, too) pnputil -d oemXX.infB) Driver from Windows Update If your PC would connect to Internet, the latest CDC driver should be automatically downloaded from Windows Update, just when a ST CDC device (VID_0483&PID_5740) is plugged in.C) Apply VCP_v1.4.0 driver Distributed VCP_v1.4.0.exe copies just installer folder. You'll need to run DPINST utility in the folder explicitly. C:\Program Files\STMicroelectronics\Software\Virtual comport driver\Win7\dpinst_x86.exe or dpinst_amd64.exe Tsuneo2015-02-03 03:24 AM
Thanks for the reply.
I did not have any driver installed prior 1.4.0. Nor windows update found any driver. Only solution for me was 1.3.1. which came with the examples. Anyway, I will try to cleanup and install again 1.4.0. I will keep you informed.2015-02-03 06:15 AM
> Nor windows update found any driver.
a) VID/PID = 0x0483 / 0x5740 What is the VID/PID, assigned to the device? Windows update (and genuine VCP_v1.4.0) matches just to the device of this VID/PID b) Single CDC device (not composite one) If the CDC interfaces would be part of a composite device, Windows update and VCP_v1.4.0 don't match, even on the above VID/PID Tsuneo2015-02-03 06:44 AM
VID and PID are the same, but widows first found a composite device (two Virtual COM ports). Which is strange, because after installing 1.3.1. it become a single device. I'm compiling CDC example from
.2015-02-03 12:54 PM
I tried with another computer, the result is the same.
This is what I got, after discovery board was connected (Windows Update did not found a driver). And after installing 1.3.1.:2015-02-04 08:32 PM
Ah, I remember.
To get ST's CDC driver from Windows Update, The Device triad (class, subclass and protocol) of the CDC device should be (0x02, 0x00, 0x00). Windows treat a CDC device of Device triad (0, 0, 0) as you have seen. The VCP example in STM32_USB-FS-Device_Lib_V4.0.0 has correctly set it up, as follows. And then, this example finely works with Windows Update and VCP_v1.4.0\STM32_USB-FS-Device_Lib_V4.0.0\Projects\Virtual_COM_Port\src\usb_desc.c
/* USB Standard Device Descriptor */
const uint8_t Virtual_Com_Port_DeviceDescriptor[] =
{
0x12, /* bLength */
USB_DEVICE_DESCRIPTOR_TYPE, /* bDescriptorType */
0x00,
0x02, /* bcdUSB = 2.00 */
0x02, /* bDeviceClass: CDC */ <------ OK
0x00, /* bDeviceSubClass */
0x00, /* bDeviceProtocol */
But all of other examples of ST's libraries, including the latest Cube ones, don't work with Windows Update and VCP_v1.4.0, because these examples set the Device triad to (0, 0, 0).
The VCP example of STM32_USB-Host-Device_Lib_V2.1.0 should be revised, as follows,
\STM32_USB-Host-Device_Lib_V2.1.0\Project\USB_Device_Examples\VCP\src\usbd_desc.c
/* USB Standard Device Descriptor */
__ALIGN_BEGIN uint8_t USBD_DeviceDesc[USB_SIZ_DEVICE_DESC] __ALIGN_END =
{
0x12, /*bLength */
USB_DEVICE_DESCRIPTOR_TYPE, /*bDescriptorType*/
0x00, /*bcdUSB */
0x02,
0x00, /*bDeviceClass*/ <------ 0x02
0x00, /*bDeviceSubClass*/
0x00, /*bDeviceProtocol*/
Also, all of CDC_Standalone examples in STM32Cube should be revised.
\STM32Cube_FW_F0_V1.2.0\Projects\STM32072B_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_desc.c
\STM32Cube_FW_F1_V1.0.0\Projects\STM3210E_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_desc.c
\STM32Cube_FW_F1_V1.0.0\Projects\STM3210C_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_desc.c
\STM32Cube_FW_F2_V1.1.0\Projects\STM322xG_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_desc.c
\STM32Cube_FW_F3_V1.1.0\Projects\STM32373C_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_desc.c
\STM32Cube_FW_F3_V1.1.0\Projects\STM32303C_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_desc.c
\STM32Cube_FW_F4_V1.4.0\Projects\STM324xG_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_desc.c
\STM32Cube_FW_F4_V1.4.0\Projects\STM324x9I_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_desc.c
\STM32Cube_FW_L1_V1.0.0\Projects\STM32L152D_EVAL\Applications\USB_Device\CDC_Standalone\Src\usbd_desc.c
/* USB Standard Device Descriptor */
const uint8_t hUSBDDeviceDesc[USB_LEN_DEV_DESC]= {
0x12, /* bLength */
USB_DESC_TYPE_DEVICE, /* bDescriptorType */
0x00, /* bcdUSB */
0x02,
0x00, /* bDeviceClass */ <------ 0x02
0x00, /* bDeviceSubClass */
0x00, /* bDeviceProtocol */
Tsuneo
2015-05-20 09:33 AM
I did the change for device class in usbd_desc.c but in Windows (XP) I get this:
I ran the 1.4 installer but perhaps it does not support XP since the driver that shows up is:Is there any way to get this to work on XP?What about on a Mac?2016-01-30 08:03 PM
Clean up all of the VCP instances in trouble on your PC using USBDeview utility,
- Run this utility - Scroll the list to left, show up ''Vendor ID'' column - Click on ''Vendor ID'' label --> the list is sorted by VID/PID - Find VID/PID = 0483/5740 (in hexadecimal, 1155/22336 in decimal, shown on the source code) - (shift-)click on the all lines of this VID/PID to select them - right click on selected lines and choose ''Uninstall the selected devices'' On Device Manager, the VCP instances in trouble are scattered around under a couple of branches. It may be hard to find them all on Device Manager. If any one would be left, the trouble could stay in unfixed. Try USBDeview to clean them up. Tsuneo2016-10-10 04:46 AM
Hello,
I am using STM32F070CB micrcontroller and working on USB peripheral, I want to send my data to PC through USB and want to verify the data on terminal , hence implementing VCP, I have downloaded STM32F0x2_USB-FS-Device_Lib V1.0.0 however after syncing these libraries in CooCox IDE my device is not acting as VCP.I'm currently rectifying the issue any help in this regard would be highly appreciated.Regards.