2014-01-28 06:02 AM
Hello,
USB Virtual Com Port example doesn't work on device modeI have a uC card wtih stm32f107 which works host and FS mode, reads Flash disc.. Now I am trying eval vcp example, I made necessary changes but it doesnt work even I put break points on main and systick. Something is wrong about VCP example with CL devices.My other question does VBus need to be open manually for device mode? Because on host mode we read flash disc by ''USBH_USR_MSC_Application'' event. #usb-vcp2014-01-29 04:13 AM
Hi
It is unclear what you are trying to do. ''I have a uC card wtih stm32f107 which works host and FS mode, reads Flash disc.. Now I am trying eval vcp example, I made necessary changes but it doesnt work'' The USB host example you have got is a USB Mass Storage device Class. ''STM Virtual Com Port'' is the host (as in PC) driver for a USB CDC device. If you want to use USB serial - this is USB Communication Device Class. There is an example of USB device type CDC. This is a 'USB device' NOT a 'USB host' It is NOT possible to be both a Host and Device on the same USB peripheral. (Some other have been toying with doing both but on the 2 separate USB peripherals) Looking in the \STM32_USB_HOST_Library directory for the USB example libraries, I do not see a Host example for a VCP. I do not know how you would adapt the MSC example into a VCP.2014-01-29 05:37 AM
is it possible to switch host msc mode to device cdc mode with same hardware?
2014-01-29 05:47 AM
''is it possible to switch host msc mode to device cdc mode with same hardware?''
Yes. That is what USB On The Go is all about.2014-01-29 06:49 AM
I am trying cdc example on my card I have connect RS232 with hyperterminal it works I can see data i send. But my card has a female usb socket. So to connect pc I find a male to male usb cable and plugged my pc. But I guess I need a virtual host for usb. Hyperterminal cant open a usb port thank you
2014-01-29 06:55 AM
Hi
''But I guess I need a virtual host for usb.'' Yes, you will need a VCP driver for windows which then makes a USB CDC look like a serial port. This is the one to use for ST parts: You can then use any terminal emulator you like2014-01-29 07:58 AM
i installed the driver and plugged usb. I openned windows Hyper Terminal but i still can't open a virtual port how will I use this driver?
2014-01-29 08:03 AM
Hi
Use Windows 'Device Manager'. Under 'Ports (COM & LPT) If the driver is installed correctly, USB device enumerated correctly, it should be listed as a COM port (my gets listed as ''STMicroelectronics Virtual COM Port (COM4)). (Sometimes the port number is large eg COM15 - it depends on how many COM devices the machine has seen!) In Hyperterminal - open that COM port. If Hyperterm cannot select that port (I think it is limited to 4) - use another terminal program.2014-01-30 12:12 AM
After I install driver before I plug usb should i seee STMicroelectronics COM under device manager>COM&LPT? or when I plug because I have no eval board just I am using its sw.. thx
2014-01-30 01:48 AM
Hi
Windows 'Device Manager'. Under 'Ports (COM & LPT) Should list all the available comm ports. ''After I install driver before I plug usb should i seee STMicroelectronics COM under device manager>COM&LPT? '' No. It should only appear after a USB CDC device is plugged in and correctly enumerates/installs. ''because I have no eval board just I am using its sw.. thx'' Only valid enumerated 'USB CDC devices' will be listed in the DeviceManager-Ports.