PORTS Forum

Ports and Interfaces => USB => Topic started by: madhukar on November 03, 2017, 02:29:12 am

Title: usb vcp mode
Post by: madhukar on November 03, 2017, 02:29:12 am
iam implementing a vcp type communication on a STM32L0 CONTROLLER device

relevant vcp driver supplied by  ST IS INSTALLED ON host pc.

our device is coincell powered and we keep the usb in powerdown mode all the time to reduce power consumption

on connecting with pc we sense the vbus and an interuput is used to start the usb port

when i connect the device to pc  it is detected  50% times and fails other times.
at times an yellow triangle appears in device manager showing a wrong com port and the communication does not work.

please suggest a way out to make a robust system.

is there a way to ask the host to initiate detection process from device side?
Title: Re: usb vcp mode
Post by: towlerg on November 03, 2017, 06:48:48 am
If you don't already try adding a serial number.
Title: Re: usb vcp mode
Post by: bpaddock on November 03, 2017, 08:24:44 am
iam implementing a vcp type communication on a STM32L0 CONTROLLER device
...
our device is coincell powered ...

If you power it externally, for at least this test, does anything change?

Title: Re: usb vcp mode
Post by: Jan Axelson on November 03, 2017, 09:31:02 am
Assuming USB 2.0 full or high speed, the host (actually the upstream hub) detects device attachment by detecting the voltage at the pull-up resistor on D+.

So the pull-up should be switched out until the device is ready to begin communicating.

Except for some devices with weak or dead batteries, the device must bring the pull-up line high within 1 s after detecting that VBUS is at least 0.8 V.
Title: Re: usb vcp mode
Post by: madhukar on November 08, 2017, 01:45:48 am
DELAY ON D+ HAS WORKED
THANKS JAN. IT IS NOW WORKING.
Title: Re: usb vcp mode
Post by: Jan Axelson on November 08, 2017, 09:10:42 am
Excellent, thanks for reporting back.
Title: Re: usb vcp mode
Post by: madhukar on November 09, 2017, 12:32:20 am
i am testing usb port in vcp mode
it works in windows 7,8,8.1
does not work in windows 10.in device manager it shows usb serial device with a comport no.
but there is exclemation mark in yellow triangle and it does not work

is it true that windows 10 has inculed a vcp driver?
if yes can you help me with usage details.
 
Title: Re: usb vcp mode
Post by: Jan Axelson on November 09, 2017, 09:56:41 am
First step, check the setupapi log file:

https://docs.microsoft.com/en-us/windows-hardware/drivers/install/setupapi-device-installation-log-entries