firmware update through USB port LPC11U14

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

firmware update through USB port LPC11U14

1,283 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vitor.soares on Wed May 28 08:46:36 MST 2014
Hello,

Is it possible to upload code to the LPC11U14 through USB pins? I'm projecting a device that needs to be remotly updated via USB. I have checked the USB DFU bootloader could do the job, but i found no instrunctions for this particular MCU

Can you point me how to do that, or is just to much trouble with a 11u14? I found no usefull information arround.


Thanks,

Vitor
Labels (1)
0 Kudos
1 Reply

942 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Tsuneo on Wed May 28 14:25:55 MST 2014

Quote:
Is it possible to upload code to the LPC11U14 through USB pins?


It's possible.
But I'm not sure, if this effort would be really worth to your paid development time.


For LPC11Uxx with the on-chip USB driver, NXP provides USB-DFU examples (USBROMDriver\USB_MSC_HID_DFU) in these code bundles.

Sample Code Bundle for LPC11U1x/2x/3x Peripherals using LPCXpresso
Sample Code Bundle for LPC11U1x/2x/3x Peripherals using Keil's MDK-ARM
Sample Code Bundle for LPC11U1x/2x/3x Peripherals using IAR's Embedded Workbench

As LPC11U14 doesn't have the on-chip USB driver, you have to implement it by yourself.
For this job, above code bundles are still available as the starting point.

a) The code bundles include full-source USB device implementations without the on-chip USB driver, like USBHID, USBCDC and USBMem on USBDriver. Start with one of them.

b) From the DFU examples on the code bundle, you may drag in the descriptors (dfu_lpc11uxx_usbdesc.c or comp_lpc11uxx_usbdesc.c) to your DFU project. Also, dfu_rd/dfu_wr in lpc11uxx_usbd_dfu.c suggests FLASH read/write procedure.

c) USB-DFU protocol is not so complicated. Described in this PDF.
http://www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf
Along with this protocol description, the base USB example is modified.

d) The rest is common to bootloader project.
- How to swap interrupt vector table
- How to jump to the "user" firmware from bootloader
- code object allignment on the FLASH and RAM
You may find answrs on this MXP appnote.
AN10995: LPC1100 secondary bootloader (with software) (v.1.3)

For experienced USB programmer, this project finishes in one or two days. But without USB coding experience, you may feel above c) troublesome.

If you would work on a LPC11Uxx with on-chip USB driver, like LPC11U24, you may directly apply the USB-DFU example on the code bundle. The price difference between LPC11U14 and LPC11U24 is less than 1 USD. I believe less than a thousand lots of production wouldn't pay the development cost, even for experienced programmer.

Tsuneo
0 Kudos