USB
  How to reset my CP2103 device on PC?

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   How to reset my CP2103 device on PC?
BF
New Member
posted January 16, 2008 03:09 AM     Click Here to See the Profile for BF   Click Here to Email BF     Edit/Delete Message
Hello,

How to reset my CP2103 device on PC through USB instead of unplugging.

(I am running VCP driver on PC.)

Many thanks!

IP: Logged

Tsuneo
Member
posted January 16, 2008 05:46 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
To reset the entire CP210x chip, you have to use the reset pin of the CP210x. When your CP210x is connected to a MCU, drive the reset pin of the CP210x using an open-drain port (w/pull-up) of the MCU.

Therefore, to reset the CP210x from PC, you have to send a command to the MCU over the CP210x!! It isn't practical, considering the situation in which reset is required.

For the communication problem, USB bus reset will re-initialize the USB side of the chip.

To issue USB bus reset on the PC,

a) Device Manager (manually)
On the Device Manager, the CP210x is enabled/disabled using "device usage" pull-down on "general" property. When disabled once, and enabled again, USB bus reset is issued to the chip.

CP210x VCP port is found under "Port (COM and LPT)" tree.

b) DevCon (DOS command)
Above manual procedure is done using DevCon command on DOS window

> devcon disable @"USB\VID_10C4&PID_EA60\0001"
> devcon enable @"USB\VID_10C4&PID_EA60\0001"

Where, 0001 is the serial number of the chip

These commands are executed using ShellExecute( open ) from your code.

Also, you can extract the procedure from the source code of DevCon.
DevCon source is included in WinDDK.

C:\WINDDK\3790.1830\src\setup\devcon\

[References]

DevCon
http://support.microsoft.com/kb/311272/en-us

"Commands for DevCon Operations" on MSDN
http://msdn2.microsoft.com/en-us/library/ms792835.aspx

"ShellExecute Function"
http://msdn2.microsoft.com/en-us/library/bb762153.aspx

WinDDK
Free WinDDK (Server 2k3 SP1 DDK) is downloaded from MS
"DDK - Windows Driver Development Kit" from MS WHDC
Find "Download the Windows Server 2003 SP1 DDK [236 MB ISO file]" link

Burn the ISO image file into a CD-R disk after download.

Tsuneo

IP: Logged

BF
New Member
posted January 17, 2008 07:59 PM     Click Here to See the Profile for BF   Click Here to Email BF     Edit/Delete Message
Hi Teuneo, Thank you!

Because my CP2103 device is powered by USB power, so, is there any way to shut down USB power from PC and then power on to reset it?

IP: Logged

Tsuneo
Member
posted January 17, 2008 09:57 PM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
"is there any way to shut down USB power from PC and then power on to reset it?"

Some hubs (or root hubs) support this function, but others not. Then, it isn't a certain way.

Related spec is here.
11.11 Hub Port Power Control (usb_20.pdf p334)

And related topic on USB-IF.
"switching off the USB power supply"
http://www.usb.org/phpbb/viewtopic.php?t=12754

Tsuneo

[This message has been edited by Tsuneo (edited January 17, 2008).]

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b