EmbeddedRelated.com
Forums
Memfault Beyond the Launch

LPC-H2148

Started by p_m_bair March 15, 2008
I am very new to the microcontroller world. I have an LPC-H2148, but
haven't yet received my JTAG dongle, so I've been attempting to set up
the serial port bootloader interface from Sparkfun
(http://www.sparkfun.com/commerce/product_info.php?products_idq4)
without success. I've tried using both the Phillips Flash Utility and
FlashMagic. I've removed the Debug jumper from the LPC-H2148.

Do I need a max232 IC between the LPC-H2148 and the bootloader interface?

One thing that didn't make sense to me is that when I measure the
voltage at Ext2-24 (labeled "3.3V" on the header assignment sheet) I
see 0.05V. If I hold the reset button down I see 3.27V. Is this what
should be expected, or is it an indication that something isn't
working correctly?

patrick
LPC-H2148 Header assignments
http://www.olimex.com/dev/pdf/lpc-h2148-pins.pdf

http://www.sparkfun.com/commerce/product_info.php?products_idg6

An Engineer's Guide to the LPC2100 Series

--- In l..., "rtstofer" wrote:
>
> --- In l..., "p_m_bair" wrote:
> >
> >
> > I am very new to the microcontroller world. I have an LPC-H2148, but
> > haven't yet received my JTAG dongle, so I've been attempting to set up
> > the serial port bootloader interface from Sparkfun
> > (http://www.sparkfun.com/commerce/product_info.php?products_idq4)
> > without success. I've tried using both the Phillips Flash Utility and
> > FlashMagic. I've removed the Debug jumper from the LPC-H2148.
> >
> > Do I need a max232 IC between the LPC-H2148 and the bootloader
> interface?
> >
> > One thing that didn't make sense to me is that when I measure the
> > voltage at Ext2-24 (labeled "3.3V" on the header assignment sheet) I
> > see 0.05V. If I hold the reset button down I see 3.27V. Is this what
> > should be expected, or is it an indication that something isn't
> > working correctly?
>
> Something is wrong and, whatever it is, it is causing an overcurrent
> on the voltage regulator. So disconnect everything you have attached
> and try again.
>
> The Debug header should be open.
>
> To get into ISP mode, P0.14 (BSL) must be grounded coming out of
> reset. Your adapter does this when S1 is closed (PROG).
>
> You adapter serves to change RS232 voltage levels to acceptable logic
> signals.
>
> There is, I believe, a setting in the Philips flash programming
> software that enables control of reset and BSL.
>
> It may be easier to test the setup if you ignore the interconnections
> with reset and BSL. All you need to do is ground P0.14 and reset the
> device. You will be in ISP mode. Remove the ground on P0.14. Now
> use whatever software you wish to download your code. I use lpc21isp
> with a target in my Makefile like:
>
> program : ${TARGET}.hex
> lpc21isp ${TARGET}.hex /dev/ttyS0 115200 14746
>
> You will need to change the 14746 crystal frequency (in kHz) to 12000
> for your board.
>
> After programming just reset the board to go. Once you have things
> this far along, you can add back the signals for reset and BSL from
> the adapter.
>
> Put the switch in PROG and either manually reset the board or allow
> the software to do it (try manual first). Let the software program
> the device and put the switch back in the non-PROG postion and reset
> the board to go.
>
> lpc21isp controls both the reset and BSL lines - use the command line:
>
> lpc21isp --help
>
> Sparkfun doesn't allow the adapter to control the BSL line - bummer...
>
> Richard
>
Thanks Richard for your help. Unfortunately the voltage measurements
were taken with only the USB cable connected, so I suspect something
has been "toasted". I will order a replacement tomorrow.

Do you (or anyone else) have any ideas about which component(s) may be
the culprit here...or possibly provide some diagnostic tips that may
help me determine if the board can be saved by replacing parts...it
sounds like the perfect opportunity for me to learn some surface
mounted soldering skills. :)

patrick
--- In l..., "rtstofer" wrote:
> > Thanks Richard for your help. Unfortunately the voltage measurements
> > were taken with only the USB cable connected, so I suspect something
> > has been "toasted". I will order a replacement tomorrow.
>
> Before you give up on the board, which may actually be toasted, check
> the 5V coming from the USB cable. Are you getting this directly from
> the PC or are you getting it from an unpowered hub with other devices
> attached?
>
> >
> > Do you (or anyone else) have any ideas about which component(s) may be
> > the culprit here...or possibly provide some diagnostic tips that may
> > help me determine if the board can be saved by replacing parts...it
> > sounds like the perfect opportunity for me to learn some surface
> > mounted soldering skills. :)
>
> The only thing holding the reset button depresses accomplishes is
> guaranteeing that the outputs are all floating. It may also stop the
> clock. Stopping the clock PROBABLY reduces the current required by
> the chip.
>
> There just aren't any parts on the header board that draw a lot of
> current other than the chip itself.
>
> I'm betting on an issue with the USB cable providing 5V power.
>
> Richard
>

USB is directly from the PC and I measure a steady 5.03V. I will
order a new board. I will keep this dead one and try to resurrect it
with a new chip in the future.

Thanks again for your help. It is GREATLY appreciated.

patrick
=======================================================================Groups related to lpc2000
=======================================================================
msp430 (388 common members)
http://groups.yahoo.com/group/msp430?v=1&t=ipt&ch=email&pub=groups&slktr0&sec=recg
Computers & Internet/Hardware: Welcome to the MSP430 User's Group! The purpose of...

AVR-Chat (177 common members)
http://groups.yahoo.com/group/AVR-Chat?v=1&t=ipt&ch=email&pub=groups&slktr1&sec=recg
Microprocessors/Microcontrollers: A place for Atmel AVR Microcontroller users to sha...

LTspice (165 common members)
http://groups.yahoo.com/group/LTspice?v=1&t=ipt&ch=email&pub=groups&slktr2&sec=recg
Engineering/Electrical: Dedicated to the exchange of information about LTs...

Homebrew_PCBs (157 common members)
http://groups.yahoo.com/group/Homebrew_PCBs?v=1&t=ipt&ch=email&pub=groups&slktr3&sec=recg
Engineering/Electrical: Designing, making, etching, soldering, printed cir...

e-embedded (151 common members)
http://groups.yahoo.com/group/e-embedded?v=1&t=ipt&ch=email&pub=groups&slktr4&sec=recg
Internet/Internet Appliances: Open-membership mailing list for embedded system d...
--- In l..., "p_m_bair" wrote:

> I am very new to the microcontroller world. I have an LPC-H2148, but
> haven't yet received my JTAG dongle, so I've been attempting to set up
> the serial port bootloader interface from Sparkfun
> (http://www.sparkfun.com/commerce/product_info.php?products_idq4)
> without success. I've tried using both the Phillips Flash Utility and
> FlashMagic. I've removed the Debug jumper from the LPC-H2148.
>
> Do I need a max232 IC between the LPC-H2148 and the bootloader
interface?

Yes, you need a MAX232 to talk serial to the LPC-H2148 with a regular
serial port. Take a look at the schematic for Olimex's LPC-P2148
prototyping board: http://www.olimex.com/dev/images/lpc-p2148-sch.gif
You only need a couple of level shifters (Tx and Rx) to get it going.

I have both the header and prototyping boards, and they both work
well, but I've never used serial on the header board -- always just
downloaded stuff through JTAG. I can't remember whether I ever
figured out how to flash through JTAG.
> Thanks Richard for your help. Unfortunately the voltage measurements
> were taken with only the USB cable connected, so I suspect something
> has been "toasted". I will order a replacement tomorrow.

Before you give up on the board, which may actually be toasted, check
the 5V coming from the USB cable. Are you getting this directly from
the PC or are you getting it from an unpowered hub with other devices
attached?

>
> Do you (or anyone else) have any ideas about which component(s) may be
> the culprit here...or possibly provide some diagnostic tips that may
> help me determine if the board can be saved by replacing parts...it
> sounds like the perfect opportunity for me to learn some surface
> mounted soldering skills. :)

The only thing holding the reset button depresses accomplishes is
guaranteeing that the outputs are all floating. It may also stop the
clock. Stopping the clock PROBABLY reduces the current required by
the chip.

There just aren't any parts on the header board that draw a lot of
current other than the chip itself.

I'm betting on an issue with the USB cable providing 5V power.

Richard

--- In l..., "p_m_bair" wrote:
> I am very new to the microcontroller world. I have an LPC-H2148, but
> haven't yet received my JTAG dongle, so I've been attempting to set up
> the serial port bootloader interface from Sparkfun
> (http://www.sparkfun.com/commerce/product_info.php?products_idq4)
> without success. I've tried using both the Phillips Flash Utility and
> FlashMagic. I've removed the Debug jumper from the LPC-H2148.
>
> Do I need a max232 IC between the LPC-H2148 and the bootloader
interface?
>
> One thing that didn't make sense to me is that when I measure the
> voltage at Ext2-24 (labeled "3.3V" on the header assignment sheet) I
> see 0.05V. If I hold the reset button down I see 3.27V. Is this what
> should be expected, or is it an indication that something isn't
> working correctly?

Something is wrong and, whatever it is, it is causing an overcurrent
on the voltage regulator. So disconnect everything you have attached
and try again.

The Debug header should be open.

To get into ISP mode, P0.14 (BSL) must be grounded coming out of
reset. Your adapter does this when S1 is closed (PROG).

You adapter serves to change RS232 voltage levels to acceptable logic
signals.

There is, I believe, a setting in the Philips flash programming
software that enables control of reset and BSL.

It may be easier to test the setup if you ignore the interconnections
with reset and BSL. All you need to do is ground P0.14 and reset the
device. You will be in ISP mode. Remove the ground on P0.14. Now
use whatever software you wish to download your code. I use lpc21isp
with a target in my Makefile like:

program : ${TARGET}.hex
lpc21isp ${TARGET}.hex /dev/ttyS0 115200 14746

You will need to change the 14746 crystal frequency (in kHz) to 12000
for your board.

After programming just reset the board to go. Once you have things
this far along, you can add back the signals for reset and BSL from
the adapter.

Put the switch in PROG and either manually reset the board or allow
the software to do it (try manual first). Let the software program
the device and put the switch back in the non-PROG postion and reset
the board to go.

lpc21isp controls both the reset and BSL lines - use the command line:

lpc21isp --help

Sparkfun doesn't allow the adapter to control the BSL line - bummer...

Richard


Memfault Beyond the Launch