ETM disabled with primary JTAG enabled on LPC2109.

Started by radoslaw_mitura October 3, 2004

Is it possible to have primary jtag interface enabled with acess to
other i/o ports including the ports shared with ETM.
In user manual there is a table that describe DBGSEL enable JTAG as
well as ETM so I suppose all pins used by ETM are inaccessible for
application use. Is it correct?
Should I use in this case only secondary JTAG with software enable?
I need to have only JTAG pins enabled and use all other pins.




An Engineer's Guide to the LPC2100 Series

Unfortunately you get all or nothing with the DBGSEL/RTCK. The ETM is
enabled along with the primary JTAG signals when DBGSEL and RTCK are
asserted on reset (as stated in the user manual). A total of 15 pins are
taken away from IO as a result of this scenario.

Using the secondary JTAG signals (switched on via the pinsel1 register,
irrelevant of DBGSEL/RTCK) allows you to debug via JTAG and only take up 5
IO pins. You don't get the ETM, yet you save 10 IO pins. This is the
scenario I am using for debugging, and it works marvelous.

However, there is one gotcha. If your firmware takes a reset you will lose
JTAG control over your processor until pinsel1 gets set back to the
correct state to enable the secondary JTAG pins. This can be bad if you
are trying to debug a firmware problem that happens early in your restart
sequence. My solution to this scenario (so far) is to put a for() loop
waiting for a volatile 32 bit memory location (initially set to 0) to
change to non-zero, right after the secondary JTAG pins are enabled, which
is done early in the restart sequence. This way I simply start up the
debugger (Insight with mpDemon in my case) and stop the processor (which
is waiting in the for() loop), set the 32 bit value to non-zero then set
my hardware breakpoint(s) (I am running from Flash) and let the processor
continue.

- Rod

--
___ ____ ___ _ ___
Rod Moffitt / _ \/ __ \/ _ \ (_)__ / _/__
http://rod.info / , _/ /_/ / // / / / _ \/ _/ _ \
/_/|_|\____/____(*)_/_//_/_/ \___/
=======================================================
~ Where loved ones are remembered http://memoriam.org ~

On Sun, 3 Oct 2004, radoslaw_mitura wrote:

>
>
> Is it possible to have primary jtag interface enabled with acess to
> other i/o ports including the ports shared with ETM.
> In user manual there is a table that describe DBGSEL enable JTAG as
> well as ETM so I suppose all pins used by ETM are inaccessible for
> application use. Is it correct?
> Should I use in this case only secondary JTAG with software enable?
> I need to have only JTAG pins enabled and use all other pins. >
>
> Yahoo! Groups Links





Hi,

I guess you are talking about the LPC2106 (there is a LPC2119) so I
don't really know which one you are referring to. The LPC2106 offers
the option to enable all debug channels, primary JTAG AND ETM or the
secondary JTAG (Application Note see in the "Files" section of this
user group)
The LPC2119 (or LPC2114) offer less RAM but more I/O and the option to
enable JTAG OR ETM or both.

Cheers, Bob

--- In , "radoslaw_mitura"
<radoslaw_mitura@y...> wrote:
>
> Is it possible to have primary jtag interface enabled with acess to
> other i/o ports including the ports shared with ETM.
> In user manual there is a table that describe DBGSEL enable JTAG as
> well as ETM so I suppose all pins used by ETM are inaccessible for
> application use. Is it correct?
> Should I use in this case only secondary JTAG with software enable?
> I need to have only JTAG pins enabled and use all other pins.




I hate to reply to my own post - yet I just want to make it clear that
my note applies to the LPC2104/2105/2106, and not to some of the other
LPC2K family members which have separate JTAG/ETM control (like the
LPC2114/2124/2212/2214 and LPC2119/2129/2194/2292/2294). Where is this
mysterious LPC2109 part anyway? ;)




Sorry. I meant 2106.

--- R M <> wrote:

>
> I hate to reply to my own post - yet I just want to
> make it clear that
> my note applies to the LPC2104/2105/2106, and not to
> some of the other
> LPC2K family members which have separate JTAG/ETM
> control (like the
> LPC2114/2124/2212/2214 and
> LPC2119/2129/2194/2292/2294). Where is this
> mysterious LPC2109 part anyway? ;) >
>

_______________________________