EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Free NXP USBlib USB Library

Started by nxp_marketing_usa November 7, 2011
Building on the popular announcement of the free Segger emWin GUI, NXP is happy to announce a free USB library, called nxpUSBlib.

http://www.lpcware.com/content/project/nxpusblib

nxpUSBlib is a full featured, open-source USB library designed to run on all USB capable LPC microcontrollers from NXP.

The library includes support for
USB 2.0
Host and device modes
Low, full and high speed transfer rates
Control, bulk, interrupt, and isochronous transfer types
Get It

- Get everything you need to build a working example on the microcontroller and board of your choice

Build It

- Learn how to build the demos using the available toolchains and run them on your development board

Use It

- Create a new USB based application from scratch or integrate the library into an existing application

An Engineer's Guide to the LPC2100 Series

works with the LPC23xx family?

Jonatan

2011/11/7 nxp_marketing_usa

> **
> Building on the popular announcement of the free Segger emWin GUI, NXP is
> happy to announce a free USB library, called nxpUSBlib.
>
> http://www.lpcware.com/content/project/nxpusblib
>
> nxpUSBlib is a full featured, open-source USB library designed to run on
> all USB capable LPC microcontrollers from NXP.
>
> The library includes support for
> USB 2.0
> Host and device modes
> Low, full and high speed transfer rates
> Control, bulk, interrupt, and isochronous transfer types
>
> Get It
>
> - Get everything you need to build a working example on the
> microcontroller and board of your choice
>
> Build It
>
> - Learn how to build the demos using the available toolchains and run them
> on your development board
>
> Use It
>
> - Create a new USB based application from scratch or integrate the library
> into an existing application
>
>
>


It might've been nice to mention that this library is based on the LUFA library by Dean Camera.

Jan Waclawek

--- In l..., "nxp_marketing_usa" wrote:
>
> Building on the popular announcement of the free Segger emWin GUI, NXP is happy to announce a free USB library, called nxpUSBlib.
>
> http://www.lpcware.com/content/project/nxpusblib
>
> nxpUSBlib is a full featured, open-source USB library designed to run on all USB capable LPC microcontrollers from NXP.
>

----Original Message----
From: l...
[mailto:l...] On Behalf Of wekovci Sent:
08 November 2011 12:14 To: l...
Subject: [lpc2000] Re: Free NXP USBlib USB Library

> It might've been nice to mention that this library is
> based on the LUFA library by Dean Camera.
>
I hope Dean is getting something out of it, he's spent years on LUFA.

--
Tim Mitchell

They say that it should be able to run on any LPC with USB, however they have only provided sample applications for Cortex M0 and M3. If someone gets it working on the LPC23xx or LPC24xx family I'd be interested.

Kevin

--- In l..., Jonatan Vieira wrote:
>
> works with the LPC23xx family?
>
> Jonatan
>

Hi,

the peripheral between LPC23xx and LPC24XX and the cortec derivates for
USB is the same. Maybe some minor configuration is different. But as for
the core is the same. For example libusb works on CM3 without any
modification. Remeber it was developed for LPC21xx series.

Marko
On 11/8/2011 3:07 PM, Kevin wrote:
>
> They say that it should be able to run on any LPC with USB, however
> they have only provided sample applications for Cortex M0 and M3. If
> someone gets it working on the LPC23xx or LPC24xx family I'd be
> interested.
>
> Kevin
>
> --- In l... ,
> Jonatan Vieira wrote:
> >
> > works with the LPC23xx family?
> >
> > Jonatan
> >



I keep hearing about code that is written for the M0 / M3 and not the ARM7,
and I think there must be some confusion here.

There is nothing magical about Cortex when you are writing C / C++, the same
compiler is even used, so all you need to do is take the existing code and
compile it.

If the register definition file does not exist for the LPC23xx family then
you should be able to cut the relevant sections from any of the existing LPC
files and simply re-define the base address.

If you look at the header files for any of the LPC devices you will see a
register definition structure and then a pointer defined to point to the
peripheral, the only differentiator between devices is generally the address
that the pointer has. ( usually in fact it's done as a macro rather than a
pointer but the effect is the same ).

It really shouldn't be more than a few minutes work since the peripherals
should not have changed, just the address map and port mappings,

Regards

Phil.

From: l... [mailto:l...] On Behalf Of
Kevin
Sent: 08 November 2011 14:07
To: l...
Subject: [lpc2000] Re: Free NXP USBlib USB Library

They say that it should be able to run on any LPC with USB, however they
have only provided sample applications for Cortex M0 and M3. If someone gets
it working on the LPC23xx or LPC24xx family I'd be interested.

Kevin

--- In l... , Jonatan
Vieira wrote:
>
> works with the LPC23xx family?
>
> Jonatan
>



Hello Phil,

are you sure this is the case ?
Have you checked this or is it just your opinion that
it should be so ?

Is this valid for all peripheral or only certain peripherals ?

Best regards,

Martin

--- In l..., "Phil Young" wrote:
>
> I keep hearing about code that is written for the M0 / M3 and not the ARM7,
> and I think there must be some confusion here.
>
>
>
> There is nothing magical about Cortex when you are writing C / C++, the same
> compiler is even used, so all you need to do is take the existing code and
> compile it.
>
> If the register definition file does not exist for the LPC23xx family then
> you should be able to cut the relevant sections from any of the existing LPC
> files and simply re-define the base address.
>
>
>
> If you look at the header files for any of the LPC devices you will see a
> register definition structure and then a pointer defined to point to the
> peripheral, the only differentiator between devices is generally the address
> that the pointer has. ( usually in fact it's done as a macro rather than a
> pointer but the effect is the same ).
>
>
>
> It really shouldn't be more than a few minutes work since the peripherals
> should not have changed, just the address map and port mappings,
>
>
>
> Regards
>
>
>
> Phil.
>
>
>
> From: l... [mailto:l...] On Behalf Of
> Kevin
> Sent: 08 November 2011 14:07
> To: l...
> Subject: [lpc2000] Re: Free NXP USBlib USB Library
>
>
>
>
>
> They say that it should be able to run on any LPC with USB, however they
> have only provided sample applications for Cortex M0 and M3. If someone gets
> it working on the LPC23xx or LPC24xx family I'd be interested.
>
> Kevin
>
> --- In l... , Jonatan
> Vieira wrote:
> >
> > works with the LPC23xx family?
> >
> > Jonatan
> >
>

What Phil says is sometimes true and sometimes not, it is very dependent on the compiler, the header files provided with the compiler, and what peripherals are used in the software.

I am speaking only about the NXP LPCxxx devices here...

Some peripherals have changed quite a lot between the LPC2xxx devices and the LPC1xxx devices. Others are pretty much the same but might have moved addresses in the memory map. Sometimes the names have changed in the header files which can make for quite a lot of work.

It is certainly not true that any software written for the LPC cortex M3 devices will work on the older ARM7 devices.

--
Tim Mitchell

Nice theory, Phil ;-)

But experience shows something completely different sometimes ... my
college is just fiddling around with porting the LPC2478's SD card code
to an LPC1788 and he is doing this since a bit more than minutes ..
after a week it's still not working

Besides that: interrupts are always different between ARM7 and M3

Regards
Herbert

Am 08.11.2011 15:41, schrieb Phil Young:
> I keep hearing about code that is written for the M0 / M3 and not the ARM7,
> and I think there must be some confusion here.
>
> There is nothing magical about Cortex when you are writing C / C++, the same
> compiler is even used, so all you need to do is take the existing code and
> compile it.
>
> If the register definition file does not exist for the LPC23xx family then
> you should be able to cut the relevant sections from any of the existing LPC
> files and simply re-define the base address.
>
> If you look at the header files for any of the LPC devices you will see a
> register definition structure and then a pointer defined to point to the
> peripheral, the only differentiator between devices is generally the address
> that the pointer has. ( usually in fact it's done as a macro rather than a
> pointer but the effect is the same ).
>
> It really shouldn't be more than a few minutes work since the peripherals
> should not have changed, just the address map and port mappings,
>
> Regards
>
> Phil.
>
> From: l... [mailto:l...] On Behalf Of
> Kevin
> Sent: 08 November 2011 14:07
> To: l...
> Subject: [lpc2000] Re: Free NXP USBlib USB Library
>
> They say that it should be able to run on any LPC with USB, however they
> have only provided sample applications for Cortex M0 and M3. If someone gets
> it working on the LPC23xx or LPC24xx family I'd be interested.
>
> Kevin


Memfault Beyond the Launch