Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] LPC2194 & LPC2294 JTAG ports

2004-11-15 by Robert Wood

Hi,

If it's the same as the 2294 (which seems likely), you have remember that the 
processor looks at the state of pin P1.26 (which has to be low) on reset to 
go into JTAG mode. Also, the datasheet says you should do a read/modify/write 
on the PINSEL register. 

It took me absolutely ages to get my head round this! 

This is what I did for the 2294, which works for me! I'm sure you'll have to 
modify slightly differently for 2194. (In fact checking the datasheet it 
looks like bits 2 and 3 are the only relevant ones for you). 

// Now PINSEL2 which configures debug lines and address and data lines
	temp = PINSEL2;
	temp |= 0x0F814920;
	temp &= ~0x08;			  // Take it out of trace mode...
	PINSEL2 = temp;

For me, the thing that finally got it working was the line:

 	temp &= ~0x08;			  // Take it out of trace mode...

You must remember that you *only* want to take it out of trace mode, not out 
of debug mode as well 

If you write all zeros to PINSEL2 (in fact if you write a zero to bit 2, 
you'll take it out of JTAG mode. This wasted a lot of my time sussing this 
out.

Also, note that the processor looks at the state of P1.20 to see whether it 
should use trace mode for P1.25:16. 

Hope this helps.

Cheers,

Rob



Hi,

I'm trying to work out a problem I'm having programming a LPC2194.  
I've posted a question on this already here.  See:

http://groups.yahoo.com/group/lpc2000/message/4049

I was looking in the LPC22194 & LPC2294 datasheets and I saw that 
the JTAG pins (P1.26-P1.31) PINSEL register was set to P1.26/RTCK at 
reset.  The LPC2194 datasheet says the JTAG's PINSEL register is set 
to '0' on reset.

Does the JTAG PINSEL register on the LPC2194 need to be set to '1' 
for me to program the LPC2194 via JTAG?

The datasheet says the PINSEL is set to '0' at reset, this seems 
wrong to me.  Seems it should be the same as the LPC2294.  That way 
it always comes up with the debug port enabled.

I was setting the PINSE2 register to 0x00000000 after my program was 
up and running because I need to use some of the TRACESYNC pins as 
IO.  If I put in a new LPC2194, take out the setting PINSEL2 to 
0x0000000, will the JTAG work?  I'll try this later and see if it 
works.  I just hate to pull any more LPC2194's off of the PCB...






 
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.