SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By falldeaf
#11721
I'm hoping to be able to write a .hex to the flash of the LPC-H2148 through the usb port on the board, with an open source version of LPC2000 ISP, (lpc21isp). The problem is that the small lpc2148 header board doesn't have the boot loader pins broken out.

After reading Jim Lynch's tutorial ( http://www.olimex.com/dev/pdf/ARM%20Cro ... on%203.pdf ) and this thread ( http://www.sparkfun.com/cgi-bin/phpbb/v ... php?t=2582 ) , It seems like even with those pins broken out, since the lpc2148's usb port is not serial converted to usb via an ftdi chip (or whatever usb->serial bridge), I can't use the lpc21isp program. Is that right? If I plug the header board into the usb port, then pull down p0.14, hit reset then then undo p0.14 will that load the boot-loader and allow the LPC2000 ISP program to upload a .hex?

If not, is there any other way to upload code to the LPC-H2148 header board via usb?

Thank you for reading.
Tom
By Dominic
#11722
Hello Tom,

as far as I know this isn't possible. The LPC2000 bootloader only works with the UART, not with the on-chip USB port.

If you have access to a Wiggler style JTAG interface you can use the OpenOCD (http://openocd.berlios.de) to download code to the on-chip flash of your LPC2148.

Regards,

Dominic
By andrey
#11731
If not, is there any other way to upload code to the LPC-H2148 header board via usb?
sure... wire up a USB module from SparkFun (or some similar USB/UART bridge) to your UART0 pins.
By falldeaf
#11734
Dominic wrote:Hello Tom,

as far as I know this isn't possible. The LPC2000 bootloader only works with the UART, not with the on-chip USB port.

If you have access to a Wiggler style JTAG interface you can use the OpenOCD (http://openocd.berlios.de) to download code to the on-chip flash of your LPC2148.

Regards,

Dominic
Thanks Dominic, I've seen that tool discussed once or twice here and I'll definitely be using it for development. However, if that works, it'll be great for the prototype, but in the final version of my board design, I'm hoping to be able to leave out the jtag port to minimize it's footprint. Obviously, i'm pretty green when it comes to designing micro-controller based devices. My only experience so far has been PICs, which I used to make Lady Ada's mp3 player with a few changes of my own. ( http://www.a-r.dyndns.org/mp3_intro/ ) For the final version of my mp3 player, I've designed a board that will use ICSP to program the PIC. But with this device, using an LPC-2148, I'm a little unsure of what the best way to program the chip in the finished package would be. For instance, should I go with Andrey's idea and include a usb->serial bridge chip and program it with the LPC2000 ISP program or maybe implement the jtag port without actually soldering the socket to the board so that I can use jtag but not take up as much space? Is there one way or another that's considered good form or at least in widespread use?

Thank you again for reading my post,
Tom.
By Dominic
#11741
Hello Tom,

FTDI has a USB to TTL level serial converter cable (TTL-232R) for $20. If you want to be able to reprogram your packaged device every now and then, without spending the extra money for the usb-serial bridge on every unit, that could be what you need.

Regards,

Dominic
By falldeaf
#11754
Thanks again Dominic, for that price, that might just be the solution I'm looking for.
By the way, are you the same Dominic that wrote openOCD? If so, wow, and thanks!