Forums

LPC2106B (old), JTAG disables P0.18-31???

Started by stevech11 July 12, 2009
Olimex says, in their LPC2106 board document
"Important: when JTAG is enabled P0.18-P1.31 ports take their JTAG alternative function no matter of PINSEL register value, so during
debugging with JTAG these ports are not available for the user program."

I found these words after fumbling for hours thinking I was at fault. The NXP user manual says that if the ARM's pin 26, RTCK, is high at power up, the secondary JTAG function is not active.

Is it true that when DBGSEL (pin 27) is high at power up, P0.18-31 are not usable as GPIO? This is what I observe.

If so, is this only true for the old chip and not so for the /01 chips?

I cannot find a source to assure I can order rev /01 chips on the Olimex Board. I ordered from two vendors; the second vendor send me 6 boards built with the old chips, like 2005 vintage.

An Engineer's Guide to the LPC2100 Series

--- In l..., "stevech11" wrote:
>
> Olimex says, in their LPC2106 board document
> "Important: when JTAG is enabled P0.18-P1.31 ports take their JTAG alternative function no matter of PINSEL register value, so during
> debugging with JTAG these ports are not available for the user program."
>
> I found these words after fumbling for hours thinking I was at fault. The NXP user manual says that if the ARM's pin 26, RTCK, is high at power up, the secondary JTAG function is not active.
>
> Is it true that when DBGSEL (pin 27) is high at power up, P0.18-31 are not usable as GPIO? This is what I observe.
>
> If so, is this only true for the old chip and not so for the /01 chips?
>
> I cannot find a source to assure I can order rev /01 chips on the Olimex Board. I ordered from two vendors; the second vendor send me 6 boards built with the old chips, like 2005 vintage.
>
Don't know whether it answers your question but the ApNote about secondary JTAG related to your question.
http://www.nxp.com/acrobat_download/applicationnotes/AN10255_2.pdf

Bob

Thanks - using the secondary JTAG port doesn't seem practical.
As I read the LPC2106 specs - if DBGSEL is true, enabling the primary JTAG, bits P0.17 to 31 are NOT USABLE, even though these bits seem unrelated to JTAG. I'm really peeved.
--- In l..., "lpc2100_fan" wrote:
>
> --- In l..., "stevech11" wrote:
> >
> > Olimex says, in their LPC2106 board document
> > "Important: when JTAG is enabled P0.18-P1.31 ports take their JTAG alternative function no matter of PINSEL register value, so during
> > debugging with JTAG these ports are not available for the user program."
> >
> > I found these words after fumbling for hours thinking I was at fault. The NXP user manual says that if the ARM's pin 26, RTCK, is high at power up, the secondary JTAG function is not active.
> >
> > Is it true that when DBGSEL (pin 27) is high at power up, P0.18-31 are not usable as GPIO? This is what I observe.
> >
> > If so, is this only true for the old chip and not so for the /01 chips?
> >
> > I cannot find a source to assure I can order rev /01 chips on the Olimex Board. I ordered from two vendors; the second vendor send me 6 boards built with the old chips, like 2005 vintage.
> >
> Don't know whether it answers your question but the ApNote about secondary JTAG related to your question.
> http://www.nxp.com/acrobat_download/applicationnotes/AN10255_2.pdf
>
> Bob
>

There's a simple way to use the secondary JTAG and free pins P0.17-P0.26.
The only requirement is, that your JTAG debugger can be connected to the secondary JTAG (P0.27-P0.31).

1. Write a simple program:

int main(void)
{
PINSEL1 = 0x55400000;

while (1);
}

2. Compile and load the program into the LPCs Flash using the serial bootloader.
3. Do a reset.
4. Your LPCs starting up and activates the secondary JTAG, so you can access it now.
5. Keep the line "PINSEL1 = 0x55400000;" on the very beginning of every program you load into the LPC.
6. Be happy!
----- Original Message -----
From: stevech11
To: l...
Sent: Tuesday, July 14, 2009 6:14 AM
Subject: [lpc2000] Re: LPC2106B (old), JTAG disables P0.18-31???

Thanks - using the secondary JTAG port doesn't seem practical.
As I read the LPC2106 specs - if DBGSEL is true, enabling the primary JTAG, bits P0.17 to 31 are NOT USABLE, even though these bits seem unrelated to JTAG. I'm really peeved.

--- In l..., "lpc2100_fan" wrote:
>
> --- In l..., "stevech11" wrote:
> >
> > Olimex says, in their LPC2106 board document
> > "Important: when JTAG is enabled P0.18-P1.31 ports take their JTAG alternative function no matter of PINSEL register value, so during
> > debugging with JTAG these ports are not available for the user program."
> >
> > I found these words after fumbling for hours thinking I was at fault. The NXP user manual says that if the ARM's pin 26, RTCK, is high at power up, the secondary JTAG function is not active.
> >
> > Is it true that when DBGSEL (pin 27) is high at power up, P0.18-31 are not usable as GPIO? This is what I observe.
> >
> > If so, is this only true for the old chip and not so for the /01 chips?
> >
> > I cannot find a source to assure I can order rev /01 chips on the Olimex Board. I ordered from two vendors; the second vendor send me 6 boards built with the old chips, like 2005 vintage.
> >
> Don't know whether it answers your question but the ApNote about secondary JTAG related to your question.
> http://www.nxp.com/acrobat_download/applicationnotes/AN10255_2.pdf
>
> Bob
>



I'd have to make up a cable to produce the 2nd JTAG port/connector.
That done, I'm confused as to how, given the below, the JTAG can download and debug via JTAG #2, a flash-resident program. Is it that you remove the DBGSEL jumper and assert the RTCK? First time, I can see that Reset takes it to the flash-resident program, as below, that enables JTAG 2. Then JTAG can download a new program into flash and run it to main() and stop, but the C startup assembler code or some such has to again do the PINSEL1 code for JTAG2 before doing anything else? And if JTAG is setup to not auto-run, would it keep control on JTAG port 2? (Running my app from RAM won't work - RAM too small).

--- In l..., "Kai F." wrote:
>
> There's a simple way to use the secondary JTAG and free pins P0.17-P0.26.
> The only requirement is, that your JTAG debugger can be connected to the secondary JTAG (P0.27-P0.31).
>
> 1. Write a simple program:
>
> int main(void)
> {
> PINSEL1 = 0x55400000;
>
> while (1);
> }
>
> 2. Compile and load the program into the LPCs Flash using the serial bootloader.
> 3. Do a reset.
> 4. Your LPCs starting up and activates the secondary JTAG, so you can access it now.
> 5. Keep the line "PINSEL1 = 0x55400000;" on the very beginning of every program you load into the LPC.
> 6. Be happy!
> ----- Original Message -----
> From: stevech11
> To: l...
> Sent: Tuesday, July 14, 2009 6:14 AM
> Subject: [lpc2000] Re: LPC2106B (old), JTAG disables P0.18-31???
>
> Thanks - using the secondary JTAG port doesn't seem practical.
> As I read the LPC2106 specs - if DBGSEL is true, enabling the primary JTAG, bits P0.17 to 31 are NOT USABLE, even though these bits seem unrelated to JTAG. I'm really peeved.
>
> --- In l..., "lpc2100_fan" wrote:
> >
> > --- In l..., "stevech11" wrote:
> > >
> > > Olimex says, in their LPC2106 board document
> > > "Important: when JTAG is enabled P0.18-P1.31 ports take their JTAG alternative function no matter of PINSEL register value, so during
> > > debugging with JTAG these ports are not available for the user program."
> > >
> > > I found these words after fumbling for hours thinking I was at fault. The NXP user manual says that if the ARM's pin 26, RTCK, is high at power up, the secondary JTAG function is not active.
> > >
> > > Is it true that when DBGSEL (pin 27) is high at power up, P0.18-31 are not usable as GPIO? This is what I observe.
> > >
> > > If so, is this only true for the old chip and not so for the /01 chips?
> > >
> > > I cannot find a source to assure I can order rev /01 chips on the Olimex Board. I ordered from two vendors; the second vendor send me 6 boards built with the old chips, like 2005 vintage.
> > >
> > Don't know whether it answers your question but the ApNote about secondary JTAG related to your question.
> > http://www.nxp.com/acrobat_download/applicationnotes/AN10255_2.pdf
> >
> > Bob
> >
>
>
>