Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Please Help:: USB configuration status

2006-03-17 by Bertrik Sikken

Yes, this appears to be the case.

I just ran a simple test program that checks the result of the 0xFE
(read device status) command and the CON bit is set when the cable
is plugged in and cleared when it is pulled out.

So you could use it in combination with the USB configuration value
that you got from the host: the device is configured only if
connected AND the configuration value != 0. You probably should
also take USB resets into account, as the manual states that a
reset causes the device to unconfigure.

I wonder if it is possible to use command 0xD8 to read the
configuration status. Although not documented in the user manual,
it would be nice to try out.

Regards,
Bertrik

Manisha Kalita wrote:
> Thanks a ton bertrik.
> 
> i want one more info. we have a CON bit responsible for current connection
> status. so, in a situation where,
> 
> a) we initialize the USB for the first time,
> b) but the board is not connected to any USB host
> 
> will this CON bit tell us that no connection is there?
> 
> Thanks again.
> 
> Regards
> Manisha
> 
> -----Original Message-----
> From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com]On Behalf
> Of Bertrik Sikken
> Sent: Friday, March 17, 2006 1:44 PM
> To: lpc2000@yahoogroups.com
> Subject: Re: [lpc2000] Please Help:: USB configuration status
> 
> 
> Manisha Kalita wrote:
>> Hi all
>>
>> i am designing an USB driver on lpc214x board. for that, i need to handle
>> the condition for USB device Configured/Not-Configured status. we can give
>> commands to Configure device (Command: 0xD8), but after configuration, can
>> we read the configuration status from any device register? i dont want to
>> use any programmable flag or something to check for the status. is there
> any
>> way to poll any register bit for this?
>>
>> please help me if any one has any idea.
> 
> I wrote a USB driver for the lpc214x so I'm quite familiar with the
> specifications of the USB controller, but I have not seen any register
> to read the current the configuration status.
> 
> Bertrik

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.