EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

JTAG and clock

Started by Nick Alexeev November 18, 2008
Colleagues,

Here's a quick newbie question (I've searched the documents but didn't
find the answer).

Does the ARM (LPC2129) have to have the main clock (XTAL1) running to
be recognized by ULINK2?

- Nick

An Engineer's Guide to the LPC2100 Series

It does need clock on XTAL1 to be recognized through JTAG. I was
able to program the ARM!..

... once. Now when I try to reprogram it, Keil uVision gives me a
message "Could not stop ARM device! Please check the JTAG cable."
Probably, I wrote something to LPC2129's Flash that prevents the JTAG
from working. Does anybody know a work-around for this problem?

I've tried this: http://www.keil.com/support/docs/3215.htm, but I'm
still getting the same messages.

- Nick

--- In l..., "Nick Alexeev" wrote:
>
> Colleagues,
>
> Here's a quick newbie question (I've searched the documents but
didn't
> find the answer).
>
> Does the ARM (LPC2129) have to have the main clock (XTAL1) running
to
> be recognized by ULINK2?
>
> - Nick
>

Hi Nick,

--- In l..., "Nick Alexeev" wrote:
>
> ... once. Now when I try to reprogram it, Keil uVision gives me a
> message "Could not stop ARM device! Please check the JTAG cable."
> Probably, I wrote something to LPC2129's Flash that prevents the JTAG
> from working. Does anybody know a work-around for this problem?
>

Maybe your PLL runs wild because of a wrong setting, or maybe you have
accidentally entered idle mode?

An easy way out of this is to pull P0.14 low while you are trying to
get JTAG access. P0.14=0 forces ISP mode, hence any possible mistake
in your software cannot take effect.

Rolf

Rolf,

Thanks for the tip! I was able to reprogram the ARM after connecting
P0.14 to ground.

- Nick

--- In l..., "rolfm_9dq" wrote:
>
> Hi Nick,
>
> --- In l..., "Nick Alexeev" wrote:
> >
> > ... once. Now when I try to reprogram it, Keil uVision gives me
a
> > message "Could not stop ARM device! Please check the JTAG
cable."
> > Probably, I wrote something to LPC2129's Flash that prevents the
JTAG
> > from working. Does anybody know a work-around for this problem?
> > Maybe your PLL runs wild because of a wrong setting, or maybe you
have
> accidentally entered idle mode?
>
> An easy way out of this is to pull P0.14 low while you are trying to
> get JTAG access. P0.14=0 forces ISP mode, hence any possible mistake
> in your software cannot take effect.
>
> Rolf
>

A simpler method is to power cycle your board.
Works for me every time, when I get the "could not stop ARM device' message.

(I don't think it can be anything in his code that prevents JTAG to work:
JTAG just takes over the CPU and stuffs instructions directly into the
pipeline)

~ Paul

From: l... [mailto:l...] On Behalf Of
Nick Alexeev
Sent: Wednesday, November 19, 2008 2:22 PM
To: l...
Subject: [lpc2000] Re: JTAG and clock

Rolf,

Thanks for the tip! I was able to reprogram the ARM after connecting
P0.14 to ground.

- Nick

--- In l... ,
"rolfm_9dq" wrote:
>
> Hi Nick,
>
> --- In l... , "Nick
Alexeev" wrote:
> >
> > ... once. Now when I try to reprogram it, Keil uVision gives me
a
> > message "Could not stop ARM device! Please check the JTAG
cable."
> > Probably, I wrote something to LPC2129's Flash that prevents the
JTAG
> > from working. Does anybody know a work-around for this problem?
> > Maybe your PLL runs wild because of a wrong setting, or maybe you
have
> accidentally entered idle mode?
>
> An easy way out of this is to pull P0.14 low while you are trying to
> get JTAG access. P0.14=0 forces ISP mode, hence any possible mistake
> in your software cannot take effect.
>
> Rolf
>


Paul,

Power-cycling the board was the 1st thing that I've tried (even before
posting the request for help). It didn't help.

I've read that LPC2000 don't like clock frequencies above 12MHz. I have
a 29MHz, because that's the only clock I have in my hands at the moment.
As I'm waiting for a slower multiplier, I'm looking for a way to set the
PLL multiplier and divider to unity (just getting started with uVision)
and see if that will fix the JTAG issue.

- Nick
--- In l..., "Paul Claessen" wrote:
>
> A simpler method is to power cycle your board.
> Works for me every time, when I get the "could not stop ARM device'
message.
>
> (I don't think it can be anything in his code that prevents JTAG to
work:
> JTAG just takes over the CPU and stuffs instructions directly into the
> pipeline)
>
> ~ Paul
> From: l... [mailto:l...] On
Behalf Of
> Nick Alexeev
> Sent: Wednesday, November 19, 2008 2:22 PM
> To: l...
> Subject: [lpc2000] Re: JTAG and clock
>
> Rolf,
>
> Thanks for the tip! I was able to reprogram the ARM after connecting
> P0.14 to ground.
>
> - Nick
>
> --- In l... ,
> "rolfm_9dq" rolfm_9dq@ wrote:
> >
> > Hi Nick,
> >
> > --- In l... ,
"Nick
> Alexeev" wrote:
> > >
> > > ... once. Now when I try to reprogram it, Keil uVision gives me
> a
> > > message "Could not stop ARM device! Please check the JTAG
> cable."
> > > Probably, I wrote something to LPC2129's Flash that prevents the
> JTAG
> > > from working. Does anybody know a work-around for this problem?
> > >
> >
> > Maybe your PLL runs wild because of a wrong setting, or maybe you
> have
> > accidentally entered idle mode?
> >
> > An easy way out of this is to pull P0.14 low while you are trying to
> > get JTAG access. P0.14=0 forces ISP mode, hence any possible mistake
> > in your software cannot take effect.
> >
> > Rolf
>

Actually, the software can cause loss of JTAG functionality. Here
are a couple of ways that I have discovered.

1. Idling the core by setting the PCON register to a value of 1.
This stops the clock to the core and you lose JTAG.

2. Enabling the watchdog to cause a reset. If the watchdog timeout
is short, JTAG gets very flaky.

Jeff

--- In l..., "Paul Claessen" wrote:
>
> A simpler method is to power cycle your board.
> Works for me every time, when I get the "could not stop ARM
device' message.
>
> (I don't think it can be anything in his code that prevents JTAG
to work:
> JTAG just takes over the CPU and stuffs instructions directly into
the
> pipeline)
>
> ~ Paul
>
>
> From: l... [mailto:l...] On
Behalf Of
> Nick Alexeev
> Sent: Wednesday, November 19, 2008 2:22 PM
> To: l...
> Subject: [lpc2000] Re: JTAG and clock
>
> Rolf,
>
> Thanks for the tip! I was able to reprogram the ARM after
connecting
> P0.14 to ground.
>
> - Nick
>
> --- In l... ,
> "rolfm_9dq" wrote:
> >
> > Hi Nick,
> >
> > --- In l...
40yahoogroups.com> , "Nick
> Alexeev" wrote:
> > >
> > > ... once. Now when I try to reprogram it, Keil uVision gives
me
> a
> > > message "Could not stop ARM device! Please check the JTAG
> cable."
> > > Probably, I wrote something to LPC2129's Flash that prevents
the
> JTAG
> > > from working. Does anybody know a work-around for this problem?
> > >
> >
> > Maybe your PLL runs wild because of a wrong setting, or maybe
you
> have
> > accidentally entered idle mode?
> >
> > An easy way out of this is to pull P0.14 low while you are
trying to
> > get JTAG access. P0.14=0 forces ISP mode, hence any possible
mistake
> > in your software cannot take effect.
> >
> > Rolf
> >
>
>
>


The 2024 Embedded Online Conference