Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] ETM disabled with primary JTAG enabled on LPC2109.

2004-10-05 by Rod Moffitt

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       / , _/ /_/ / // / / / _ \/ _/ _ \
  rodANTISPAM@... /_/|_|\____/____(*)_/_//_/_/ \___/
  =======================================================
  ~ 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
>
>
>
>
>
>
>
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.