Ports and Interfaces > USB

usb vcp mode

(1/2) > >>

madhukar:
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?

towlerg:
If you don't already try adding a serial number.

bpaddock:

--- Quote from: madhukar on November 03, 2017, 02:29:12 am ---iam implementing a vcp type communication on a STM32L0 CONTROLLER device
...
our device is coincell powered ...

--- End quote ---

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

Jan Axelson:
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.

madhukar:
DELAY ON D+ HAS WORKED
THANKS JAN. IT IS NOW WORKING.

Navigation

[0] Message Index

[#] Next page

Go to full version