Yahoo Groups archive

Lpc2000

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

Thread

LPC2148 USB

LPC2148 USB

2006-01-04 by varuzhandanielyan

There are several examples of the LPC2148 USB port
usage, though there are very difficult to adapt for
user's need.  But, besides, some have very strange
behaviour.  For example the USBHID from Keil, running
on the MCB2148 evaluaton board.
To be recogized by PC, the USB cable should be disconnected
from the board and then connected again.  After it
the example starts to work..., but until the microcontroller
was reseted.  Then one again needs to repeat the
disconnect/connect procedure to make the board work.
Sure, such software is useless for more or less real usage.
For example, the microcontroller can be resetted by the
watchdog and the USB connection will be lost.
So my questions:

1. Is such behaviour property of LPC2148 or just the
Keil example?
2. Are there available examples of the LPC2148 USB usage
without such problems?

By the way, I have designed a PCB with the FT2232C chip
and LPC21x8 microcontroller and such a couple of chips
work very well and practically no problems with the USB
programming.

Varuzhan

RE: [lpc2000] LPC2148 USB

2006-01-04 by Joel Winarske

Hi Varuzhan,

> There are several examples of the LPC2148 USB port
> usage, though there are very difficult to adapt for
> user's need.  But, besides, some have very strange
> behaviour.  For example the USBHID from Keil, running
> on the MCB2148 evaluaton board.
> To be recogized by PC, the USB cable should be disconnected
> from the board and then connected again.  After it
> the example starts to work..., but until the microcontroller
> was reseted.  Then one again needs to repeat the
> disconnect/connect procedure to make the board work.
> Sure, such software is useless for more or less real usage.
> For example, the microcontroller can be resetted by the
> watchdog and the USB connection will be lost.
> So my questions:
> 

When working with the USB examples be sure to start with the USB audio
example.  It appears to be the most recent.

> 1. Is such behaviour property of LPC2148 or just the
> Keil example?

I've ported two of the Keil USB based examples to IAR without the problem
you mention.  The Keil board does not implement the "Connect" feature,
perhaps this is the difference.

> 2. Are there available examples of the LPC2148 USB usage
> without such problems?

The IAR LPC2148 KS board implements the "Connect" feature.

The Keil examples are a reasonable starting point, but still require some
work.  When using these examples I would advise an Ellisys USB analyzer to
confirm your work.


Joel

Re: LPC2148 USB

2006-01-04 by varuzhandanielyan

Hi Joel,

With the USB audio example is the same.  While it is
runnink, it is Ok.  But if you reset the microcontroller
during the running, the system stops.  You need again to
disconnect the USB cable, wait a little, connect it again
and again run the player program.
Then, please, can you explain your
> The IAR LPC2148 KS board implements the "Connect" feature

Is it a hardware or software feature?

Maybe I could not express clearly my problem, but I think
that the same example will work the same way with any compiler
if properly ported.

Varuzhan


--- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@i...> wrote:
>
> Hi Varuzhan,
> 
> > There are several examples of the LPC2148 USB port
> > usage, though there are very difficult to adapt for
> > user's need.  But, besides, some have very strange
> > behaviour.  For example the USBHID from Keil, running
> > on the MCB2148 evaluaton board.
> > To be recogized by PC, the USB cable should be disconnected
> > from the board and then connected again.  After it
> > the example starts to work..., but until the microcontroller
> > was reseted.  Then one again needs to repeat the
> > disconnect/connect procedure to make the board work.
> > Sure, such software is useless for more or less real usage.
> > For example, the microcontroller can be resetted by the
> > watchdog and the USB connection will be lost.
> > So my questions:
> > 
> 
> When working with the USB examples be sure to start with the USB audio
> example.  It appears to be the most recent.
> 
> > 1. Is such behaviour property of LPC2148 or just the
> > Keil example?
> 
> I've ported two of the Keil USB based examples to IAR without the
problem
> you mention.  The Keil board does not implement the "Connect" feature,
> perhaps this is the difference.
> 
> > 2. Are there available examples of the LPC2148 USB usage
> > without such problems?
> 
> The IAR LPC2148 KS board implements the "Connect" feature.
> 
> The Keil examples are a reasonable starting point, but still require
some
> work.  When using these examples I would advise an Ellisys USB
analyzer to
Show quoted textHide quoted text
> confirm your work.
> 
> 
> Joel
>

RE: [lpc2000] Re: LPC2148 USB

2006-01-04 by Joel Winarske

> With the USB audio example is the same.  While it is
> runnink, it is Ok.  But if you reset the microcontroller
> during the running, the system stops.  You need again to
> disconnect the USB cable, wait a little, connect it again
> and again run the player program.
> Then, please, can you explain your
> > The IAR LPC2148 KS board implements the "Connect" feature
> 
> Is it a hardware or software feature?

If P0.31 is setup for CONNECT, you use this signal to switch 1.5k pull-up
via external transistor.  It allows the LPC214x to connect/disconnect itself
from the bus via software.  So the scenario you describe would be addressed.

It is illustrated in the LPC214x data sheet on page 32.


Joel

Re: LPC2148 USB

2006-01-04 by varuzhandanielyan

--- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@i...> wrote:
>
> > With the USB audio example is the same.  While it is
> > runnink, it is Ok.  But if you reset the microcontroller
> > during the running, the system stops.  You need again to
> > disconnect the USB cable, wait a little, connect it again
> > and again run the player program.
> > Then, please, can you explain your
> > > The IAR LPC2148 KS board implements the "Connect" feature
> > 
> > Is it a hardware or software feature?
> 
> If P0.31 is setup for CONNECT, you use this signal to switch 1.5k 
pull-up
> via external transistor.  It allows the LPC214x to 
connect/disconnect itself
> from the bus via software.  So the scenario you describe would be 
addressed.
Show quoted textHide quoted text
> 
> It is illustrated in the LPC214x data sheet on page 32.
> 
> 
> Joel
>

Re: LPC2148 USB

2006-01-04 by varuzhandanielyan

Ok, Joel

Thank you very much.
Seems the lack of the mentioned P0.31 connection is
a drawback of the Keil MCB2140 board.  I will try tomorrow
to resolder manually the board and test the programs again.

Varuzhan

--- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@i...> wrote:
>
> > With the USB audio example is the same.  While it is
> > runnink, it is Ok.  But if you reset the microcontroller
> > during the running, the system stops.  You need again to
> > disconnect the USB cable, wait a little, connect it again
> > and again run the player program.
> > Then, please, can you explain your
> > > The IAR LPC2148 KS board implements the "Connect" feature
> > 
> > Is it a hardware or software feature?
> 
> If P0.31 is setup for CONNECT, you use this signal to switch 1.5k 
pull-up
> via external transistor.  It allows the LPC214x to 
connect/disconnect itself
> from the bus via software.  So the scenario you describe would be 
addressed.
Show quoted textHide quoted text
> 
> It is illustrated in the LPC214x data sheet on page 32.
> 
> 
> Joel
>

Re: LPC2148 USB

2006-01-04 by varuzhandanielyan

From the LPC2148 documentation it is not clear how the P0.31 pin
should be used for CONNECT feature.
Particularly, in the schematic p.32 of datasheet the pin is connected
to GND trough the relay winding, thus disabling the JTAG port, see 
p.10 of the datasheet.
Is there a schematic of a working connection of pin P0.31?

Varuzhan

--- In lpc2000@yahoogroups.com, "varuzhandanielyan" <dan@x...> wrote:
Show quoted textHide quoted text
>
> Ok, Joel
> 
> Thank you very much.
> Seems the lack of the mentioned P0.31 connection is
> a drawback of the Keil MCB2140 board.  I will try tomorrow
> to resolder manually the board and test the programs again.
> 
> Varuzhan
> 
> --- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@i...> wrote:
> >
> > > With the USB audio example is the same.  While it is
> > > runnink, it is Ok.  But if you reset the microcontroller
> > > during the running, the system stops.  You need again to
> > > disconnect the USB cable, wait a little, connect it again
> > > and again run the player program.
> > > Then, please, can you explain your
> > > > The IAR LPC2148 KS board implements the "Connect" feature
> > > 
> > > Is it a hardware or software feature?
> > 
> > If P0.31 is setup for CONNECT, you use this signal to switch 1.5k 
> pull-up
> > via external transistor.  It allows the LPC214x to 
> connect/disconnect itself
> > from the bus via software.  So the scenario you describe would be 
> addressed.
> > 
> > It is illustrated in the LPC214x data sheet on page 32.
> > 
> > 
> > Joel
> >
>

Re: LPC2148 USB

2006-01-04 by Steve Franks

Joel,

> I've ported two of the Keil USB based examples to IAR without the
problem

I'm reinventing the wheel here.  Any chance you are willing to post your
project(s) <given that you are using gcc, that is>?

Best,
Steve


[Non-text portions of this message have been removed]

simple xtea source

2006-01-04 by Marko Pavlin (home)

I am looking for pure and simple XTEA implementation in C.

RE: [lpc2000] Re: LPC2148 USB

2006-01-04 by Joel Winarske

> From the LPC2148 documentation it is not clear how the P0.31 pin
> should be used for CONNECT feature.
> Particularly, in the schematic p.32 of datasheet the pin is connected
> to GND trough the relay winding, thus disabling the JTAG port, see
> p.10 of the datasheet.

The page 32 diagram is referencing a pull-up.  Refer to section 7.1.5.1 of
the USB specification.  

> Is there a schematic of a working connection of pin P0.31?

http://www.olimex.com/dev/pdf/LPC-P2148.pdf

When PINSEL0 P0.31 is configured for CONNECT, refer to page 225 of the User
Manual for control of this pin.


Joel

RE: [lpc2000] Re: LPC2148 USB

2006-01-04 by Joel Winarske

> I'm reinventing the wheel here.  Any chance you are willing to post your
> project(s) <given that you are using gcc, that is>?

I use IAR EW for ARM7 and AVR development.  I have used GCC for XScale,
Coldfire, and Nios-II.  Sorry, I cannot post any USB code.  It would be
unfair to my wife and three young kids.

That said, I did post a UART fractional divider calculator.

Regards,
Joel

------------------------------------
Independent Electronics, Inc.
Joel Winarske
Systems Architect
joelw@...
2248 Morlan Drive
Napa, CA  94558
tel: (707) 320-4271
fax: (408) 516-5978
Timezone: GMT -08:00
------------------------------------

RE: [lpc2000] simple xtea source

2006-01-07 by Joel Winarske

> I am looking for pure and simple XTEA implementation in C.

This has it listed with a flow chart:
http://www.eetasia.com/ARTICLES/2005JUN/A/2005JUN16_SECD_AN.PDF

Paper from the authors has it:
http://www.ftp.cl.cam.ac.uk/ftp/papers/djw-rmn/djw-rmn-xtea.ps.gz


Joel

RE: [lpc2000] simple xtea source

2006-01-07 by Joel Winarske

> > I am looking for pure and simple XTEA implementation in C.
> 
> This has it listed with a flow chart:
> http://www.eetasia.com/ARTICLES/2005JUN/A/2005JUN16_SECD_AN.PDF
> 
> Paper from the authors has it:
> http://www.ftp.cl.cam.ac.uk/ftp/papers/djw-rmn/djw-rmn-xtea.ps.gz

Also:
http://www-users.cs.york.ac.uk/~matthew/TEA/

Re: LPC2148 USB

2006-01-09 by octofroggy

Hi Joel,

Would you be willing to share your IAR ports of the Keil Code?

Ian


--- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@i...> wrote:
>
> Hi Varuzhan,
> 
> > There are several examples of the LPC2148 USB port
> > usage, though there are very difficult to adapt for
> > user's need.  But, besides, some have very strange
> > behaviour.  For example the USBHID from Keil, running
> > on the MCB2148 evaluaton board.
> > To be recogized by PC, the USB cable should be disconnected
> > from the board and then connected again.  After it
> > the example starts to work..., but until the microcontroller
> > was reseted.  Then one again needs to repeat the
> > disconnect/connect procedure to make the board work.
> > Sure, such software is useless for more or less real usage.
> > For example, the microcontroller can be resetted by the
> > watchdog and the USB connection will be lost.
> > So my questions:
> > 
> 
> When working with the USB examples be sure to start with the USB 
audio
> example.  It appears to be the most recent.
> 
> > 1. Is such behaviour property of LPC2148 or just the
> > Keil example?
> 
> I've ported two of the Keil USB based examples to IAR without the 
problem
> you mention.  The Keil board does not implement the "Connect" 
feature,
> perhaps this is the difference.
> 
> > 2. Are there available examples of the LPC2148 USB usage
> > without such problems?
> 
> The IAR LPC2148 KS board implements the "Connect" feature.
> 
> The Keil examples are a reasonable starting point, but still 
require some
> work.  When using these examples I would advise an Ellisys USB 
analyzer to
Show quoted textHide quoted text
> confirm your work.
> 
> 
> Joel
>

RE: [lpc2000] Re: LPC2148 USB

2006-01-09 by Joel Winarske

Hi Ian,

> Would you be willing to share your IAR ports of the Keil Code?

You missed my reply on a similar request.  Short answer is no.  Long answer
is that I've invested a fair amount of time and $1k on a USB hardware
analyzer.  Hence it would not be fair to my wife and three small children.

Regards,
Joel Winarske

------------------------------------
Independent Electronics, Inc.
Joel Winarske
Systems Architect
joelw@...
2248 Morlan Drive
Napa, CA  94558
tel: (707) 320-4271
fax: (408) 516-5978
Timezone: GMT -08:00 
------------------------------------

RE: Re: LPC2148 USB

2006-01-09 by Steve Franks

Ian,

Fear not.  If you want it for GCC, I'm working on it, and I don't give up
easily.  However, I'm not getting paid for it at the moment; I just think
everyone should be able to evaluate the hardware & examples w/o buying into
high-priced tools (I'm also a firm believer that GCC is of equal or higher
quality than any alternative) [I also like templates which no one else seems
to implement in the embedded world - please, someone contradict me].

As such, you may have to be patient; perhaps we could collaborate a bit?

On the other hand, if you just want to see that your board works, download
the limited (free) Keil tools.  You only have to add one line to their
examples to make them work on the IAR/Olimex 2148 boards.  I'd suggest a
reply off-list if I can be of help to that ends (it's been discussed),
unless it's of general interest.

I already have GCC-ported copies of the Keil examples that build, but don't
talk correctly - windows complains of Usb errors.  I'm suspecting an
interrupt problem, although I don't rule out other madness, like
struct-packing, or crt.S - type problems.  I've even got the warnings out of
the build, still no-go.

-> If anyone on list understands differences between Keil & GCC from a
compiler-behavior standpoint, I'd love to hear from you.

Steve



________________________________________________________________________
>
> Message: 24
>    Date: Mon, 9 Jan 2006 12:15:37 -0800
>    From: "Joel Winarske" <joelw@...>
> Subject: RE: Re: LPC2148 USB
>
> Hi Ian,
>
> > Would you be willing to share your IAR ports of the Keil Code?
>
> You missed my reply on a similar request.  Short answer is no.  Long
> answer
> is that I've invested a fair amount of time and $1k on a USB hardware
> analyzer.  Hence it would not be fair to my wife and three small children.
>
> Regards,
> Joel Winarske
>


[Non-text portions of this message have been removed]

Re: [lpc2000] RE: Re: LPC2148 USB

2006-01-12 by Bertrik Sikken

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is there _any_ open-source USB code for the LPC series?

I looked at the Keil USB examples and one of the things I wonder
about is the fact that the USB drivers run almost entirely in
interrupt context.
I think this makes things complicated for more complex USB
devices, like USB mass storage connected to SD/MMC through SPI.
The interrupt routine probably shouldn't have to wait for other
devices, so I suppose an OS is needed to let the interrupt trigger
a worker task for stuff that takes more time (like retrieving a
sector from the SD/MMC card).

How are other USB stacks generally structured?
Do they need an OS?

Kind regards,
Bertrik


Steve Franks wrote:
> Ian,
> 
> Fear not.  If you want it for GCC, I'm working on it, and I don't give up
> easily.  However, I'm not getting paid for it at the moment; I just think
> everyone should be able to evaluate the hardware & examples w/o buying into
> high-priced tools (I'm also a firm believer that GCC is of equal or higher
> quality than any alternative) [I also like templates which no one else seems
> to implement in the embedded world - please, someone contradict me].
> 
> As such, you may have to be patient; perhaps we could collaborate a bit?
> 
> On the other hand, if you just want to see that your board works, download
> the limited (free) Keil tools.  You only have to add one line to their
> examples to make them work on the IAR/Olimex 2148 boards.  I'd suggest a
> reply off-list if I can be of help to that ends (it's been discussed),
> unless it's of general interest.
> 
> I already have GCC-ported copies of the Keil examples that build, but don't
> talk correctly - windows complains of Usb errors.  I'm suspecting an
> interrupt problem, although I don't rule out other madness, like
> struct-packing, or crt.S - type problems.  I've even got the warnings out of
> the build, still no-go.
> 
> -> If anyone on list understands differences between Keil & GCC from a
> compiler-behavior standpoint, I'd love to hear from you.
> 
> Steve
> 
> 
> 
> ________________________________________________________________________
>>
>> Message: 24
>>    Date: Mon, 9 Jan 2006 12:15:37 -0800
>>    From: "Joel Winarske" <joelw@...>
>> Subject: RE: Re: LPC2148 USB
>>
>> Hi Ian,
>>
>> > Would you be willing to share your IAR ports of the Keil Code?
>>
>> You missed my reply on a similar request.  Short answer is no.  Long
>> answer
>> is that I've invested a fair amount of time and $1k on a USB hardware
>> analyzer.  Hence it would not be fair to my wife and three small children.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDxshjETD6mlrWxPURAvD0AKCdKRsXyraUlu503ZIcYSZB5Qs2eACgj5/q
R9n/ROiCPHKSX0zqQ286qqw=
=746K
-----END PGP SIGNATURE-----

LPC2148 USB

2006-02-09 by rasitgumus

Hello all

Can I use the usb port of the LPC2148 to connect to the PC?

thanks

Re: LPC2148 USB

2006-02-09 by Danish Ali

At the risk of sounding unhelpful, yes that's what it's there for.

But you have to write the software to run on the lpc2148 to make
it behave like one of the standard USB items. (There's an example
for it to pretend to be a USB mouse, and another as an external
drive).

If you don't want it to be a standard USB device, you have to
write lpc software to do what you want AND write the USB drivers
for the Windows end.

What is not supported (I don't think it can be) is to use the
built-in USB port for downloading code and then debugging, so
you'll still need a JTAG interface.

Wigglers are very cheap.

Regards,
Danish
--- In lpc2000@yahoogroups.com, "rasitgumus" <rasitgumus@...> wrote:
Show quoted textHide quoted text
>
> Hello all
> 
> Can I use the usb port of the LPC2148 to connect to the PC?
> 
> thanks
>

Re: [lpc2000] Re: LPC2148 USB

2006-02-09 by Xtian Xultz

It is possible to attach an USB device (like a pen drive) to the LPC2148 to 
manage their memory?
AFAIK, the USB on LPC2148 must be a host, and the USB on a pen drive is 
client, the LPC can act as a host? If not, it is too difficult to implement 
it?

Em Qui 09 Fev 2006 10:14, Danish Ali escreveu:
Show quoted textHide quoted text
> At the risk of sounding unhelpful, yes that's what it's there for.
>
> But you have to write the software to run on the lpc2148 to make
> it behave like one of the standard USB items. (There's an example
> for it to pretend to be a USB mouse, and another as an external
> drive).
>
> If you don't want it to be a standard USB device, you have to
> write lpc software to do what you want AND write the USB drivers
> for the Windows end.
>
> What is not supported (I don't think it can be) is to use the
> built-in USB port for downloading code and then debugging, so
> you'll still need a JTAG interface.
>
> Wigglers are very cheap.
>
> Regards,
> Danish

Re: LPC2148 USB

2006-02-09 by Danish Ali

You are right, the LPC2148 CANNOT act as a host - you cannot
plug a pen drive into it.

But that's not the question that was asked. ;-)

What was asked was can the LPC2148 connect to a PC over USB
so the PC would be the host.

Sorry if that's something I didn't make clear. I tried to extend
my answer into one of the questions that wasn't asked.

Regards,
Danish
--- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@...> wrote:
>
> It is possible to attach an USB device (like a pen drive) to the
LPC2148 to 
> manage their memory?
> AFAIK, the USB on LPC2148 must be a host, and the USB on a pen drive is 
> client, the LPC can act as a host? If not, it is too difficult to
implement 
Show quoted textHide quoted text
> it?
> 
> Em Qui 09 Fev 2006 10:14, Danish Ali escreveu:
> > At the risk of sounding unhelpful, yes that's what it's there for.
> >
> > But you have to write the software to run on the lpc2148 to make
> > it behave like one of the standard USB items. (There's an example
> > for it to pretend to be a USB mouse, and another as an external
> > drive).
> >
> > If you don't want it to be a standard USB device, you have to
> > write lpc software to do what you want AND write the USB drivers
> > for the Windows end.
> >
> > What is not supported (I don't think it can be) is to use the
> > built-in USB port for downloading code and then debugging, so
> > you'll still need a JTAG interface.
> >
> > Wigglers are very cheap.
> >
> > Regards,
> > Danish
>

Re: [lpc2000] Re: LPC2148 USB

2006-02-09 by Jim Parziale

Actually I'm very glad he brought up the subject.  I was wondering if it
were possible to use a USB drive to extend memory on devices that may not
have an SD slot.  But, that's that.

However, getting back to the original topic...

It would be interesting to make the LPC2148 act like an external hard drive
to the PC, such that you could download a code update file to it. Then when
you reboot the board, it could read that file as a program update.  I think
this sounds like embeded Linux... :-)

So far I only have an LPC2106 device to play with, but all this talk is
making me hungry to play with a new device :-)

Jim

On 2/9/06, Danish Ali <danish@...> wrote:
>
>  You are right, the LPC2148 CANNOT act as a host - you cannot
> plug a pen drive into it.
>
> But that's not the question that was asked. ;-)
>
> What was asked was can the LPC2148 connect to a PC over USB
> so the PC would be the host.
>
> Sorry if that's something I didn't make clear. I tried to extend
> my answer into one of the questions that wasn't asked.
>
> Regards,
> Danish
> --- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@...> wrote:
> >
> > It is possible to attach an USB device (like a pen drive) to the
> LPC2148 to
> > manage their memory?
> > AFAIK, the USB on LPC2148 must be a host, and the USB on a pen drive is
> > client, the LPC can act as a host? If not, it is too difficult to
> implement
> > it?
> >
> > Em Qui 09 Fev 2006 10:14, Danish Ali escreveu:
> > > At the risk of sounding unhelpful, yes that's what it's there for.
> > >
> > > But you have to write the software to run on the lpc2148 to make
> > > it behave like one of the standard USB items. (There's an example
> > > for it to pretend to be a USB mouse, and another as an external
> > > drive).
> > >
> > > If you don't want it to be a standard USB device, you have to
> > > write lpc software to do what you want AND write the USB drivers
> > > for the Windows end.
> > >
> > > What is not supported (I don't think it can be) is to use the
> > > built-in USB port for downloading code and then debugging, so
> > > you'll still need a JTAG interface.
> > >
> > > Wigglers are very cheap.
> > >
> > > Regards,
> > > Danish
> >
>


[Non-text portions of this message have been removed]

Re: [lpc2000] Re: LPC2148 USB

2006-02-09 by Xtian Xultz

Em Qui 09 Fev 2006 11:20, Danish Ali escreveu:
> You are right, the LPC2148 CANNOT act as a host - you cannot
> plug a pen drive into it.
>
> But that's not the question that was asked. ;-)

I agree, sorry, thats only a doubt that resides in my mind for a long time.
The differences between host and client are too hard to implement, like, in 
firmware, or it is completelly impossible to do it?
(I know usb.org have a lot of documents about it, if you send me a RTFM I will 
understand, its just I am curious about it)

Re: LPC2148 USB

2006-02-21 by varuzhandanielyan

--- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@...> wrote:
>
> > From the LPC2148 documentation it is not clear how the P0.31 pin
> > should be used for CONNECT feature.
> > Particularly, in the schematic p.32 of datasheet the pin is connected
> > to GND trough the relay winding, thus disabling the JTAG port, see
> > p.10 of the datasheet.
> 
> The page 32 diagram is referencing a pull-up.  Refer to section
7.1.5.1 of
> the USB specification.  
> 
> > Is there a schematic of a working connection of pin P0.31?
> 
> http://www.olimex.com/dev/pdf/LPC-P2148.pdf
> 
> When PINSEL0 P0.31 is configured for CONNECT, refer to page 225 of
the User
> Manual for control of this pin.
> 
> 
> Joel
>


I want to restart the discussion.  First the description of the problem:

When I run the USBHID example according to
description, it runs well (with Client1) just until I push the reset
button on the MCB2140. Then it hungs and one needs to close (kill)
HIDClient, disconnect the board, then connect again and run the HIDClient.
As the reset condition is pretty common: Watchdog Reset, Brounout,
etc, this example is absolutely not useful for learning how to run a
real application.
Is there any possibility to solve the problem so that the connection
between HIDClent and the board restarts again after the
microcontroller reset?

I sent this question to the Keil forum, no answer.
Then I mounted on the MCB2148 the P0.31 connection circuit according
to the message above and the Olimex schamatic.  It does not work. 
When I connect the 1.5k resistor from USB:pin3 to +3.3v it works, but
as described above, hanging after the microcontroller RESET, when the
resistor is connected between the USB:pin3 and the Q3 (refering to the
Olimex schematic) the USBHID does not recognize the board.
Maybe somebody knows how to change the USBHID example for is starts to
work with the Olimex-like connection.
Thanks in advance,
Varuzhan

RE: [lpc2000] Re: LPC2148 USB

2006-02-21 by Joel Winarske

Hi Varuzhan,

> > When PINSEL0 P0.31 is configured for CONNECT, refer to page 225 of
> the User
> > Manual for control of this pin.

Did you configure PINSEL0 P0.31 for CONNECT?
Are you sending command as per page 225 to connect/disconnect?


Joel

Re: LPC2148 USB

2006-02-21 by varuzhandanielyan

Hi, Joel

I changed P0.31 to be configured as CONNECT:
  PINSEL1 |= 0x80004000; // 0x40004000;                   /* Select
USB Link, VBUS */

The CON bit (page 225) is already set by the call in the Keil example:
  USB_Connect(TRUE);                        /* USB Connect */

But it still does not work.

By the way, my previous project with LPC2138 and FTDIChip FT2232C
started to work without any problem.  It is pity, that the LPC2148 USB
usage requires such effort.

Varuzhan


--- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@...> wrote:
Show quoted textHide quoted text
>
> Hi Varuzhan,
> 
> > > When PINSEL0 P0.31 is configured for CONNECT, refer to page 225 of
> > the User
> > > Manual for control of this pin.
> 
> Did you configure PINSEL0 P0.31 for CONNECT?
> Are you sending command as per page 225 to connect/disconnect?
> 
> 
> Joel
>

Re: LPC2148 USB

2006-02-22 by philips_apps

Varuzhan,

    On Keil's website, there is an app-note how to use the soft 
connect: http://www.keil.com/support/docs/3141.htm

    It's a regret that, unlike Olimex and IAR board, Keil's board 
doesn't have the soft connect feature on the board. So, you will 
have to rewire the board as seen on the Olimex schematics or Keil's 
app-note.
    I have tested with both external power supply and USB power
with soft connect logic. It works just fine. What Joel said is true: 
set PINSEL1 to use "soft connect", then send SET_DEVICE_STATUS 
command to protocol engine by calling "USB_Connect(TRUE)" as seen in 
Keil's example. I think you may want to check your H/W logic again.

    In Keil's example, you may want to add "USB_Connect(TRUE)"
in the ISR handler, right after USB_Reset(), to deal with bus reset 
interrupt, just to be safe.

Regards,

Tom


--- In lpc2000@yahoogroups.com, "varuzhandanielyan" <dan@...> wrote:
>
> Hi, Joel
> 
> I changed P0.31 to be configured as CONNECT:
>   PINSEL1 |= 0x80004000; // 0x40004000;                   /* Select
> USB Link, VBUS */
> 
> The CON bit (page 225) is already set by the call in the Keil 
example:
>   USB_Connect(TRUE);                        /* USB Connect */
> 
> But it still does not work.
> 
> By the way, my previous project with LPC2138 and FTDIChip FT2232C
> started to work without any problem.  It is pity, that the LPC2148 
USB
> usage requires such effort.
> 
> Varuzhan
> 
> 
> --- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@> wrote:
> >
> > Hi Varuzhan,
> > 
> > > > When PINSEL0 P0.31 is configured for CONNECT, refer to page 
225 of
Show quoted textHide quoted text
> > > the User
> > > > Manual for control of this pin.
> > 
> > Did you configure PINSEL0 P0.31 for CONNECT?
> > Are you sending command as per page 225 to connect/disconnect?
> > 
> > 
> > Joel
> >
>

Re: LPC2148 USB

2006-02-23 by varuzhandanielyan

Nothing helps.

I am going step-by-step using ULINK and watching the P0.31
state by scope.
If I configure P0.31 as output, I can easily set it to 0 or
1, but when I configure it for CONNECT inside the USB_Init() :
PINSEL1 |=  0x80004000;
and try to set the SoftConnect_N active, P0.31 remains in
high (inactive) state.
I tried both calling the USB_Connect(TRUE) and immediate
by commands
CMD_CODE = 0x00FE0500;
CMD_CODE = 0x00010100;
placing them in different places, particularly after
USB_Reset() as recommended - no effect.

Please, help me, what is wrong?

Great thanks in advance,
Varuzhan



--- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@...> wrote:
Show quoted textHide quoted text
>
> Varuzhan,
> 
>     On Keil's website, there is an app-note how to use the soft 
> connect: http://www.keil.com/support/docs/3141.htm
> 
>     It's a regret that, unlike Olimex and IAR board, Keil's board 
> doesn't have the soft connect feature on the board. So, you will 
> have to rewire the board as seen on the Olimex schematics or Keil's 
> app-note.
>     I have tested with both external power supply and USB power
> with soft connect logic. It works just fine. What Joel said is true: 
> set PINSEL1 to use "soft connect", then send SET_DEVICE_STATUS 
> command to protocol engine by calling "USB_Connect(TRUE)" as seen in 
> Keil's example. I think you may want to check your H/W logic again.
> 
>     In Keil's example, you may want to add "USB_Connect(TRUE)"
> in the ISR handler, right after USB_Reset(), to deal with bus reset 
> interrupt, just to be safe.
> 
> Regards,
> 
> Tom
> 
> 
> --- In lpc2000@yahoogroups.com, "varuzhandanielyan" <dan@> wrote:
> >
> > Hi, Joel
> > 
> > I changed P0.31 to be configured as CONNECT:
> >   PINSEL1 |= 0x80004000; // 0x40004000;                   /* Select
> > USB Link, VBUS */
> > 
> > The CON bit (page 225) is already set by the call in the Keil 
> example:
> >   USB_Connect(TRUE);                        /* USB Connect */
> > 
> > But it still does not work.
> > 
> > By the way, my previous project with LPC2138 and FTDIChip FT2232C
> > started to work without any problem.  It is pity, that the LPC2148 
> USB
> > usage requires such effort.
> > 
> > Varuzhan
> > 
> > 
> > --- In lpc2000@...m, "Joel Winarske" <joelw@> wrote:
> > >
> > > Hi Varuzhan,
> > > 
> > > > > When PINSEL0 P0.31 is configured for CONNECT, refer to page 
> 225 of
> > > > the User
> > > > > Manual for control of this pin.
> > > 
> > > Did you configure PINSEL0 P0.31 for CONNECT?
> > > Are you sending command as per page 225 to connect/disconnect?
> > > 
> > > 
> > > Joel
> > >
> >
>

Re: [lpc2000] Re: LPC2148 USB

2006-02-23 by Bertrik Sikken

Maybe this helps:

In my USB code, I have P0.31 configured as CONNECT and P0.23
as VBUS sense. With that configuration I found that P0.31 can
only become active when P0.23 sees a high level.

Regards,
Bertrik

varuzhandanielyan wrote:
Show quoted textHide quoted text
> Nothing helps.
> 
> I am going step-by-step using ULINK and watching the P0.31
> state by scope.
> If I configure P0.31 as output, I can easily set it to 0 or
> 1, but when I configure it for CONNECT inside the USB_Init() :
> PINSEL1 |=  0x80004000;
> and try to set the SoftConnect_N active, P0.31 remains in
> high (inactive) state.
> I tried both calling the USB_Connect(TRUE) and immediate
> by commands
> CMD_CODE = 0x00FE0500;
> CMD_CODE = 0x00010100;
> placing them in different places, particularly after
> USB_Reset() as recommended - no effect.
> 
> Please, help me, what is wrong?
> 
> Great thanks in advance,
> Varuzhan
> 
> 
> 
> --- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@...> wrote:
>>
>> Varuzhan,
>>
>>     On Keil's website, there is an app-note how to use the soft
>> connect: http://www.keil.com/support/docs/3141.htm
>>
>>     It's a regret that, unlike Olimex and IAR board, Keil's board
>> doesn't have the soft connect feature on the board. So, you will
>> have to rewire the board as seen on the Olimex schematics or Keil's
>> app-note.
>>     I have tested with both external power supply and USB power
>> with soft connect logic. It works just fine. What Joel said is true:
>> set PINSEL1 to use "soft connect", then send SET_DEVICE_STATUS
>> command to protocol engine by calling "USB_Connect(TRUE)" as seen in
>> Keil's example. I think you may want to check your H/W logic again.
>>
>>     In Keil's example, you may want to add "USB_Connect(TRUE)"
>> in the ISR handler, right after USB_Reset(), to deal with bus reset
>> interrupt, just to be safe.
>>
>> Regards,
>>
>> Tom
>>
>>
>> --- In lpc2000@yahoogroups.com, "varuzhandanielyan" <dan@> wrote:
>> >
>> > Hi, Joel
>> >
>> > I changed P0.31 to be configured as CONNECT:
>> >   PINSEL1 |= 0x80004000; // 0x40004000;                   /* Select
>> > USB Link, VBUS */
>> >
>> > The CON bit (page 225) is already set by the call in the Keil
>> example:
>> >   USB_Connect(TRUE);                        /* USB Connect */
>> >
>> > But it still does not work.
>> >
>> > By the way, my previous project with LPC2138 and FTDIChip FT2232C
>> > started to work without any problem.  It is pity, that the LPC2148
>> USB
>> > usage requires such effort.
>> >
>> > Varuzhan
>> >
>> >
>> > --- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@> wrote:
>> > >
>> > > Hi Varuzhan,
>> > >
>> > > > > When PINSEL0 P0.31 is configured for CONNECT, refer to page
>> 225 of
>> > > > the User
>> > > > > Manual for control of this pin.
>> > >
>> > > Did you configure PINSEL0 P0.31 for CONNECT?
>> > > Are you sending command as per page 225 to connect/disconnect?
>> > >
>> > >
>> > > Joel
>> > >
>> >
>>

Re: LPC2148 USB

2006-02-23 by varuzhandanielyan

New questions.

Thanks to Bertrik!  I checked the P0.23 pin and there was wrong
level, because by factory mistake, the R38 and R39 resistors values on
my MCB2140 board were messed.  When I re-soldered them in right way,
the USBHID worked.  But...
1. After I reset the microcontroller, I must again select the KEIL
MCB2140 HID in the HID Client utility Device menu to reconnect the
board.
Could anybody help and tell how the HID Client should be changed to
solve the problem, i.e. to reconnect the microcontroller automatically
after reset?

2. Is 48 MHz the maximal frequency to run LPC2148 with USB?

Great thanks in advance,
Varuzhan  
 

--- In lpc2000@yahoogroups.com, Bertrik Sikken <bertrik@...> wrote:
Show quoted textHide quoted text
>
> Maybe this helps:
> 
> In my USB code, I have P0.31 configured as CONNECT and P0.23
> as VBUS sense. With that configuration I found that P0.31 can
> only become active when P0.23 sees a high level.
> 
> Regards,
> Bertrik
> 
> varuzhandanielyan wrote:
> > Nothing helps.
> > 
> > I am going step-by-step using ULINK and watching the P0.31
> > state by scope.
> > If I configure P0.31 as output, I can easily set it to 0 or
> > 1, but when I configure it for CONNECT inside the USB_Init() :
> > PINSEL1 |=  0x80004000;
> > and try to set the SoftConnect_N active, P0.31 remains in
> > high (inactive) state.
> > I tried both calling the USB_Connect(TRUE) and immediate
> > by commands
> > CMD_CODE = 0x00FE0500;
> > CMD_CODE = 0x00010100;
> > placing them in different places, particularly after
> > USB_Reset() as recommended - no effect.
> > 
> > Please, help me, what is wrong?
> > 
> > Great thanks in advance,
> > Varuzhan
> > 
> > 
> > 
> > --- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@> wrote:
> >>
> >> Varuzhan,
> >>
> >>     On Keil's website, there is an app-note how to use the soft
> >> connect: http://www.keil.com/support/docs/3141.htm
> >>
> >>     It's a regret that, unlike Olimex and IAR board, Keil's board
> >> doesn't have the soft connect feature on the board. So, you will
> >> have to rewire the board as seen on the Olimex schematics or Keil's
> >> app-note.
> >>     I have tested with both external power supply and USB power
> >> with soft connect logic. It works just fine. What Joel said is true:
> >> set PINSEL1 to use "soft connect", then send SET_DEVICE_STATUS
> >> command to protocol engine by calling "USB_Connect(TRUE)" as seen in
> >> Keil's example. I think you may want to check your H/W logic again.
> >>
> >>     In Keil's example, you may want to add "USB_Connect(TRUE)"
> >> in the ISR handler, right after USB_Reset(), to deal with bus reset
> >> interrupt, just to be safe.
> >>
> >> Regards,
> >>
> >> Tom
> >>
> >>
> >> --- In lpc2000@yahoogroups.com, "varuzhandanielyan" <dan@> wrote:
> >> >
> >> > Hi, Joel
> >> >
> >> > I changed P0.31 to be configured as CONNECT:
> >> >   PINSEL1 |= 0x80004000; // 0x40004000;                   /* Select
> >> > USB Link, VBUS */
> >> >
> >> > The CON bit (page 225) is already set by the call in the Keil
> >> example:
> >> >   USB_Connect(TRUE);                        /* USB Connect */
> >> >
> >> > But it still does not work.
> >> >
> >> > By the way, my previous project with LPC2138 and FTDIChip FT2232C
> >> > started to work without any problem.  It is pity, that the LPC2148
> >> USB
> >> > usage requires such effort.
> >> >
> >> > Varuzhan
> >> >
> >> >
> >> > --- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@> wrote:
> >> > >
> >> > > Hi Varuzhan,
> >> > >
> >> > > > > When PINSEL0 P0.31 is configured for CONNECT, refer to page
> >> 225 of
> >> > > > the User
> >> > > > > Manual for control of this pin.
> >> > >
> >> > > Did you configure PINSEL0 P0.31 for CONNECT?
> >> > > Are you sending command as per page 225 to connect/disconnect?
> >> > >
> >> > >
> >> > > Joel
> >> > >
> >> >
> >>
>

Re: LPC2148 USB

2006-02-23 by pitstock_kiwi

Hi Varuzhan

I had the same problem where the USB would not re connect. Heres what 
I did. It is a hack but works until I have time to work it out 
properly or someone publishes the correct method.

I have set my MCB2140 as self powered for debugging ease. 

in USBCFG.h I changed some zeros ot ones like this

#define USB_POWER_EVENT     1//0
#define USB_RESET_EVENT     1
#define USB_SUSPEND_EVENT   1//0
#define USB_RESUME_EVENT    1//0
#define USB_WAKEUP_EVENT    1//0

in USBUSER.C I did this

#if USB_RESUME_EVENT
void USB_Resume_Event (void) {
  // TODO: hacky fix so reconnect works. Find out right way later
  // this fix makes self powerd devices work on reconnect
  USB_Reset();	// USB hardware reset
  USB_Init();                               /* USB Initialization */
  USB_Connect(TRUE);                        /* USB Connect */
}
#endif


Cheers
Kiwi Keith

--- In lpc2000@yahoogroups.com, "varuzhandanielyan" <dan@...> wrote:
Show quoted textHide quoted text
>
> Nothing helps.
> 
> I am going step-by-step using ULINK and watching the P0.31
> state by scope.
> If I configure P0.31 as output, I can easily set it to 0 or
> 1, but when I configure it for CONNECT inside the USB_Init() :
> PINSEL1 |=  0x80004000;
> and try to set the SoftConnect_N active, P0.31 remains in
> high (inactive) state.
> I tried both calling the USB_Connect(TRUE) and immediate
> by commands
> CMD_CODE = 0x00FE0500;
> CMD_CODE = 0x00010100;
> placing them in different places, particularly after
> USB_Reset() as recommended - no effect.
> 
> Please, help me, what is wrong?
> 
> Great thanks in advance,
> Varuzhan
> 
>

Re: LPC2148 USB

2006-02-24 by varuzhandanielyan

Hi,

Kiwi.  Have you a transistor on pin P0.31 for 1.5k or just
1.5k directly connected to +3.3V as on the MCB2140?

Varuzhan


--- In lpc2000@yahoogroups.com, "pitstock_kiwi" <keith@...> wrote:
Show quoted textHide quoted text
>
> Hi Varuzhan
> 
> I had the same problem where the USB would not re connect. Heres what 
> I did. It is a hack but works until I have time to work it out 
> properly or someone publishes the correct method.
> 
> I have set my MCB2140 as self powered for debugging ease. 
> 
> in USBCFG.h I changed some zeros ot ones like this
> 
> #define USB_POWER_EVENT     1//0
> #define USB_RESET_EVENT     1
> #define USB_SUSPEND_EVENT   1//0
> #define USB_RESUME_EVENT    1//0
> #define USB_WAKEUP_EVENT    1//0
> 
> in USBUSER.C I did this
> 
> #if USB_RESUME_EVENT
> void USB_Resume_Event (void) {
>   // TODO: hacky fix so reconnect works. Find out right way later
>   // this fix makes self powerd devices work on reconnect
>   USB_Reset();	// USB hardware reset
>   USB_Init();                               /* USB Initialization */
>   USB_Connect(TRUE);                        /* USB Connect */
> }
> #endif
> 
> 
> Cheers
> Kiwi Keith
> 
> --- In lpc2000@yahoogroups.com, "varuzhandanielyan" <dan@> wrote:
> >
> > Nothing helps.
> > 
> > I am going step-by-step using ULINK and watching the P0.31
> > state by scope.
> > If I configure P0.31 as output, I can easily set it to 0 or
> > 1, but when I configure it for CONNECT inside the USB_Init() :
> > PINSEL1 |=  0x80004000;
> > and try to set the SoftConnect_N active, P0.31 remains in
> > high (inactive) state.
> > I tried both calling the USB_Connect(TRUE) and immediate
> > by commands
> > CMD_CODE = 0x00FE0500;
> > CMD_CODE = 0x00010100;
> > placing them in different places, particularly after
> > USB_Reset() as recommended - no effect.
> > 
> > Please, help me, what is wrong?
> > 
> > Great thanks in advance,
> > Varuzhan
> > 
> >
>

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.