Forums

LPC2148 JTAG programming on a consistent basis

Started by Sutton Mehaffey January 25, 2011
We are experiencing problems with every prototype board (and most
production boards) in initial programming using JTAG. It seems for most
of the boards, we always have to program serially first and then JTAG
works from then on. Has anyone else had this problem? Shouldn't you be
able to program thru JTAG the first time? I have a CPLD that we've
never had any JTAG issues with. It always programs the first time. I'm
trying to establish some type of protocol of initial programming of the
LPC2148, so I thought I would start with knowing whether it should work
with JTAG out of the box. If not, we need to try and figure out why
that is. Any ideas. Thanks.
--
Sutton Mehaffey
Lookout Portable Security
4040 Royal Dr.
Kennesaw, GA 30144
770-514-7999, 800-207-6269
Fax: 770-514-1285
http://www.lookoutportablesecurity.com
s...@lookoutportablesecurity.com

An Engineer's Guide to the LPC2100 Series

--- In l..., Sutton Mehaffey wrote:
>
> We are experiencing problems with every prototype board (and most
> production boards) in initial programming using JTAG. It seems for most
> of the boards, we always have to program serially first and then JTAG
> works from then on. Has anyone else had this problem? Shouldn't you be
> able to program thru JTAG the first time? I have a CPLD that we've
> never had any JTAG issues with. It always programs the first time. I'm
> trying to establish some type of protocol of initial programming of the
> LPC2148, so I thought I would start with knowing whether it should work
> with JTAG out of the box. If not, we need to try and figure out why
> that is. Any ideas. Thanks.
> --
> Sutton Mehaffey
> Lookout Portable Security
> 4040 Royal Dr.
> Kennesaw, GA 30144
> 770-514-7999, 800-207-6269
> Fax: 770-514-1285
> http://www.lookoutportablesecurity.com
> sutton@...
>
Yes, you should be able to use JTAG right out of the box. If a board has firmware that puts it into IDLE mode or POWER-DOWN mode, you'll need to tie pin 0.14 low to enter the nxp bootloader and reprogram the board. Can do so with jtag usb dongle, although sometimes it takes a few board resets to get it working. Also, could see if it works with "flash magic" to test your host programmer. Try swapping out your jtag dongle to test dongle. Does your board have enough power? Don't count on the jtag dongle to power it - depends on board.

"If a board has firmware that puts it into IDLE mode or POWER-DOWN mode"

Since the CPU is brand new, the default firmware is what is in there.

Sutton Mehaffey
Lookout Portable Security
4040 Royal Dr.
Kennesaw, GA 30144
770-514-7999, 800-207-6269
Fax: 770-514-1285
http://www.lookoutportablesecurity.com
s...@lookoutportablesecurity.com

On 1/25/2011 10:59 AM, cynergized wrote:
>
> --- In l... ,
> Sutton Mehaffey wrote:
> >
> > We are experiencing problems with every prototype board (and most
> > production boards) in initial programming using JTAG. It seems for most
> > of the boards, we always have to program serially first and then JTAG
> > works from then on. Has anyone else had this problem? Shouldn't you be
> > able to program thru JTAG the first time? I have a CPLD that we've
> > never had any JTAG issues with. It always programs the first time. I'm
> > trying to establish some type of protocol of initial programming of the
> > LPC2148, so I thought I would start with knowing whether it should work
> > with JTAG out of the box. If not, we need to try and figure out why
> > that is. Any ideas. Thanks.
> > --
> > Sutton Mehaffey
> > Lookout Portable Security
> > 4040 Royal Dr.
> > Kennesaw, GA 30144
> > 770-514-7999, 800-207-6269
> > Fax: 770-514-1285
> > http://www.lookoutportablesecurity.com
> > sutton@...
> >
> Yes, you should be able to use JTAG right out of the box. If a board
> has firmware that puts it into IDLE mode or POWER-DOWN mode, you'll
> need to tie pin 0.14 low to enter the nxp bootloader and reprogram the
> board. Can do so with jtag usb dongle, although sometimes it takes a
> few board resets to get it working. Also, could see if it works with
> "flash magic" to test your host programmer. Try swapping out your jtag
> dongle to test dongle. Does your board have enough power? Don't count
> on the jtag dongle to power it - depends on board.
On 25/01/2011 15:16, Sutton Mehaffey wrote:
> We are experiencing problems with every prototype board (and most
> production boards) in initial programming using JTAG. It seems for most
> of the boards, we always have to program serially first and then JTAG
> works from then on. Has anyone else had this problem? Shouldn't you be
> able to program thru JTAG the first time? I have a CPLD that we've
> never had any JTAG issues with. It always programs the first time. I'm
> trying to establish some type of protocol of initial programming of the
> LPC2148, so I thought I would start with knowing whether it should work
> with JTAG out of the box. If not, we need to try and figure out why
> that is. Any ideas. Thanks.

What JTAG and software are you using?

Leon
--
Leon Heller
G1HSM
From: l... [mailto:l...] On Behalf Of
Sutton Mehaffey
Sent: 25 January 2011 16:21
To: l...
Subject: Re: [lpc2000] Re: LPC2148 JTAG programming on a consistent basis

> > "If a board has firmware that puts it into IDLE mode or POWER-DOWN mode"

> Since the CPU is brand new, the default firmware is what is in there.

Since there is no firmware in it, it will be running the bootloader without
the PLL and hence you will need to clock JTAG slowly or, better still, use
adaptive clocking.

--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
SolderCore arriving Winter 2010! http://www.soldercore.com

Using Keil's ULINK2 with uVison 4.

Sutton Mehaffey
Lookout Portable Security
4040 Royal Dr.
Kennesaw, GA 30144
770-514-7999, 800-207-6269
Fax: 770-514-1285
http://www.lookoutportablesecurity.com
s...@lookoutportablesecurity.com

On 1/25/2011 11:13 AM, Leon Heller wrote:
>
> On 25/01/2011 15:16, Sutton Mehaffey wrote:
> > We are experiencing problems with every prototype board (and most
> > production boards) in initial programming using JTAG. It seems for most
> > of the boards, we always have to program serially first and then JTAG
> > works from then on. Has anyone else had this problem? Shouldn't you be
> > able to program thru JTAG the first time? I have a CPLD that we've
> > never had any JTAG issues with. It always programs the first time. I'm
> > trying to establish some type of protocol of initial programming of the
> > LPC2148, so I thought I would start with knowing whether it should work
> > with JTAG out of the box. If not, we need to try and figure out why
> > that is. Any ideas. Thanks.
>
> What JTAG and software are you using?
>
> Leon
> --
> Leon Heller
> G1HSM
On 25/01/2011 16:38, Sutton Mehaffey wrote:
> Using Keil's ULINK2 with uVison 4.
I've never had any problems with the LPC2148. It could be something to
do with your hardware. Is the board your own design?

Leon
--
Leon Heller
G1HSM, or my own
Hi:

From LPC2148 User Manual, Section 22.5:

"On the LPC2141/2/4/6/8, the pins above [JTAG pins] are multiplexed with P1.31-26. To have them
come up as a Debug port, connect a weak bias resistor (4.7-10 kΩ depending on the
external JTAG circuitry) between VSS and the P1.26/RTCK pin. To have them come up as
GPIO pins, do not connect a bias resistor, and ensure that any external driver connected
to P1.26/RTCK is either driving high, or is in high-impedance state, during Reset."

Are you following this recommendation?

I also put a 1 second delay at the beginning of each program, before doing anything else, to give chance to the JTAG debugger to synchronize with the processor and be able to program.

HAve you used the J-LINK debugger/programmer to program at the factory? We haven't had any problem with that one either.

Regards,

Alex

--- In l..., Sutton Mehaffey wrote:
>
> We are experiencing problems with every prototype board (and most
> production boards) in initial programming using JTAG. It seems for most
> of the boards, we always have to program serially first and then JTAG
> works from then on. Has anyone else had this problem? Shouldn't you be
> able to program thru JTAG the first time? I have a CPLD that we've
> never had any JTAG issues with. It always programs the first time. I'm
> trying to establish some type of protocol of initial programming of the
> LPC2148, so I thought I would start with knowing whether it should work
> with JTAG out of the box. If not, we need to try and figure out why
> that is. Any ideas. Thanks.
> --
> Sutton Mehaffey
> Lookout Portable Security
> 4040 Royal Dr.
> Kennesaw, GA 30144
> 770-514-7999, 800-207-6269
> Fax: 770-514-1285
> http://www.lookoutportablesecurity.com
> sutton@...
>

Yes. I have 10K between VSS and a RTCK. I actually made it a jumper.

Sutton Mehaffey
Lookout Portable Security
4040 Royal Dr.
Kennesaw, GA 30144
770-514-7999, 800-207-6269
Fax: 770-514-1285
http://www.lookoutportablesecurity.com
s...@lookoutportablesecurity.com

On 1/25/2011 12:43 PM, alexander_ribero wrote:
>
> Hi:
>
> >From LPC2148 User Manual, Section 22.5:
>
> "On the LPC2141/2/4/6/8, the pins above [JTAG pins] are multiplexed
> with P1.31-26. To have them
> come up as a Debug port, connect a weak bias resistor (4.7-10 kΩ
> depending on the
> external JTAG circuitry) between VSS and the P1.26/RTCK pin. To have
> them come up as
> GPIO pins, do not connect a bias resistor, and ensure that any
> external driver connected
> to P1.26/RTCK is either driving high, or is in high-impedance state,
> during Reset."
>
> Are you following this recommendation?
>
> I also put a 1 second delay at the beginning of each program, before
> doing anything else, to give chance to the JTAG debugger to
> synchronize with the processor and be able to program.
>
> HAve you used the J-LINK debugger/programmer to program at the
> factory? We haven't had any problem with that one either.
>
> Regards,
>
> Alex
>
> --- In l... ,
> Sutton Mehaffey wrote:
> >
> > We are experiencing problems with every prototype board (and most
> > production boards) in initial programming using JTAG. It seems for most
> > of the boards, we always have to program serially first and then JTAG
> > works from then on. Has anyone else had this problem? Shouldn't you be
> > able to program thru JTAG the first time? I have a CPLD that we've
> > never had any JTAG issues with. It always programs the first time. I'm
> > trying to establish some type of protocol of initial programming of the
> > LPC2148, so I thought I would start with knowing whether it should work
> > with JTAG out of the box. If not, we need to try and figure out why
> > that is. Any ideas. Thanks.
> > --
> > Sutton Mehaffey
> > Lookout Portable Security
> > 4040 Royal Dr.
> > Kennesaw, GA 30144
> > 770-514-7999, 800-207-6269
> > Fax: 770-514-1285
> > http://www.lookoutportablesecurity.com
> > sutton@...
> >
Yes. It is our own design. I had one today that we couldn't program
via JTAG, but once done serially, JTAG worked.

Sutton Mehaffey
Lookout Portable Security
4040 Royal Dr.
Kennesaw, GA 30144
770-514-7999, 800-207-6269
Fax: 770-514-1285
http://www.lookoutportablesecurity.com
s...@lookoutportablesecurity.com

On 1/25/2011 12:07 PM, Leon Heller wrote:
>
> On 25/01/2011 16:38, Sutton Mehaffey wrote:
> >
> >
> > Using Keil's ULINK2 with uVison 4.
>
> I've never had any problems with the LPC2148. It could be something to
> do with your hardware. Is the board your own design?
>
> Leon
> --
> Leon Heller
> G1HSM, or my own