LUFA open source USB stack now for NXP ARM processors

Looks like the Lightweight USB Framework for AVRs (LUFA) has just been ported for ARM microcontrollers. NXP recently released a package for their LPC Cortex M3 family of ARM controllers. You won’t find a reference to LUFA on their nxpUSBlib description page (which we think is kind of sad), but if you grab a copy of the beta code the Version.h header file shows that it is indeed a port of the project. This is further backed up by the LUFA creator, [Dean Camera], who consulted with the NXP team doing the work.

The package provides an open-source USB stack that you can use in your projects as a USB host or USB device. We’re advocates of open source packages like this one as it makes it much easier for hobbyists to get help using the tools, and it allows the community to give back through bug fixes and feature additions.

We’ve highlighted a few LUFA projects, like this keyboard remapper and this AVR programmer. We’re looking to seeing the first set of NXP LUFA projects roll through!

[Thanks Johnny]

Comments

  1. Brian says:

    Another option is the NXP LPC 1342 which has on-chip USB HID.

    If you want to use USB for something low-bandwidth, this is a great option since it saves a few precious KB for program memory. The best part is that there are already HID drivers written for Windows, Linux and some phones so you don’t have to write your own custom driver for each device.

    • Kuy says:

      The LPC134x parts, like the other micros supported by LUFA, implement the hardware and low-level functions of a complete USB device, which is not restricted to the HID profile. HID is a limited class of USB device intended for low-speed input devices (hence the name.) Lots hobbyists mistakenly think that HID is the way to connect a micro to your Mac/PC/Phone but in general this is not true.

      Other microcontrollers support being both a USB device or their own USB host (so other USB devices can connect to them.) USB On-The-Go (where it can auto-negotiate a host or device role) is another available implementation.

      • Brian says:

        True. USB HID is only good for low-bandwidth applications.

        It was the perfect choice for us since it was fast enough for our application and we didn’t have to develop drivers for a bunch of operating systems.

        I wasn’t familiar with LUFA before, but it looks like a pretty robust library. Definitely something to keep in mind for future reference.

    • Henryk Plötz says:

      Note that you don’t need to “develop drivers for a bunch of operating systems” either way, since that’s what libusb is for. A simple libusb_open_device_with_vid_pid(), libusb_claim_interface() and voila, you can do libusb_bulk_transfer() to your heart’s content. I’d almost say that this might even be easier than doing whatever you need to do to (ab)use the HID protocol on your target platform. Unless, of course, you actually want to deliver keystrokes, mouse movements, or similar things that are directly supported by the OS already.

  2. Simon Inns says:

    LUFA is an amazingly clean and easy to use library that out-strips any of the closed source/semi-free (as in not free speech) libraries I have used. The more targets it’s ported to the merrier in my opinion. Also Dean provides personal support to developers which is second-to-none. Nice to see it moving to other platforms!

  3. Hackerspacer says:

    Can somebody explain exactly what this *does*?

    • Kuy says:

      It takes care of the basic, common functionality of a USB device and allows you to focus on implementing the part that is unique to your product. USB devices operate by sending or receiving chunks of data to/from the host, providing ‘methods’ to be invoked on the device (not unlike a software library or web API) and, in some cases, signalling the host when events happen. This is the stuff you implement that makes your device what it is.

  4. WestfW says:

    If it’s the same stack that NXP presented at ARM TechCon earlier this month, it’s a library that lets you use the NXP ARM chips that have USB hardware as various USB devices, with little more than “I want to be a Mass Storage device, here are the functions that source and sink data.” Looked cool; almost too easy. Apparently this will be in ROM on the newer USB-capable chips.

  5. Someone has a strange definition of “opensource”, it’s for NXP processors ONLY.
    The license reads:
    “Permission to use, copy, modify, and distribute this software and its documentation for any purpose is hereby granted without fee, provided that it is used in conjunction with NXP Semiconductors microcontrollers.”

    • Tom Schwarz says:

      there is nothing strange about that.

      the source is open. that’s what “open source” implies. you are making the (common) mistake of confusing openly available source code with an unconditional and/or completely free licensing model.

      • angus says:

        It’s not a “common mistake” to say that open source implies free licensing. It’s actually a widely accepted meaning, and the meaning intended by the people who originally coined the phrase, even though it’s not what the words literally say.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,647 other followers