Yahoo Groups archive

Lpc2000

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

Thread

Please Help:: USB configuration status

Please Help:: USB configuration status

2006-03-17 by Manisha Kalita

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.

Reagards
Manisha

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s)and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender or administrator@...

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

2006-03-17 by Bertrik Sikken

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

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

2006-03-17 by Manisha Kalita

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
Show quoted textHide quoted text
-----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



Yahoo! Groups Links







The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s)and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender or administrator@...

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:
Show quoted textHide quoted text
> 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

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

2006-03-17 by Joel Winarske

Hi Manisha,

> 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


Be sure to enable DEV_STAT in the USBDevIntEn register.  When DEV_STAT is
set, USB Bus reset, USB suspend change or Connect change events occur. +

ISR code:

    disr = DEV_INT_STAT;                     /* Device Interrupt Status */
    if (disr & DEV_STAT_INT) {
        WrCmd(CMD_GET_DEV_STAT);
        val = RdCmdDat(DAT_GET_DEV_STAT);       /* Device Status */
        if (val & DEV_RST) {                    /* Reset */
            OS_SignalEvent(EVENT_USB_RESET,&TCB_USB);
            goto isr_end;
        }
        if (val & DEV_CON_CH) {                 /* Change */
            OS_SignalEvent(EVENT_USB_CON_CH,&TCB_USB);
            goto isr_end;
        }
    }

Connection state would be tracked by CON_CH, and RST. +

Once your code enumerates and configures correctly post RST, state would be
configured and connected.  On CON_CH device would be disconnected and
un-configured.

> will this CON bit tell us that no connection is there?

To determine valid connection with host it's half hardware, half software.



+ 201, 202, 225, and 226 of the LPC2148 user manual.


Joel 

------------------------------------
Independent Electronics, Inc.
www.indyelectronics.com
2248 Morlan Drive
Napa, CA  94558
tel: (707) 320-4271
fax: (408) 516-5978
Timezone: GMT -08:00 
------------------------------------

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

2006-03-19 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:
Show quoted textHide quoted text
> 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

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

2006-03-20 by Manisha Kalita

Thanks a lot Bertrik.

but, i just want to clear an issue that if the board is not connected to any
host (i.e. self powered device) but the board is configured along with the
initialization of USB, then in what status (cleared/set) this CON bit will
be? can we be sure about this?

Regards,
Manisha
Show quoted textHide quoted text
-----Original Message-----
From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com]On Behalf
Of Bertrik Sikken
Sent: Sunday, March 19, 2006 8:21 PM
To: lpc2000@yahoogroups.com
Subject: Re: [lpc2000] Please Help:: USB configuration status


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




Yahoo! Groups Links






The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s)and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender or administrator@...

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.