EmbeddedRelated.com
Forums

LPC2138 JTAG connection problem

Started by mich...@yahoo.it November 7, 2006
Hi Guys,

I've made a board with a lpc2138 and a 20-pin jtag connector.
I've used the schematic of olimex dev board
( http://www.olimex.com/dev/pdf/lpc-p2138.pdf ) as starting point. I've
connected the TMS,TDI,TCK, TRST and TDO pins to the connector, I've
connected all power pins to 3.3V or GND, I've connected a cristal between
X1 and X2 with the capacitors to GND. There are also a pull-up for the
reset pin and a pull-down for the RTCK pin.

I'm using a wiggler clone made as Leon scheme (with connection between pin
8 and 15 of the DB25)

Using an oscilloscope I can see TMS,TDI,TCK and TRST move when I try to
connect to the processor using OpenOCD, H-Tag or OCD Commander.

The TDO pin is high and doesn't move.

Do someone have an idea of what could be the problem?

Regards
Michele

Chiacchiera con i tuoi amici in tempo reale!
http://it.messenger.yahoo.com" target="_blank" rel="nofollow">http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com

An Engineer's Guide to the LPC2100 Series

----- Original Message -----
From:
To:
Sent: Tuesday, November 07, 2006 8:50 AM
Subject: [lpc2000] LPC2138 JTAG connection problem
> Hi Guys,
>
> I've made a board with a lpc2138 and a 20-pin jtag connector.
> I've used the schematic of olimex dev board
> ( http://www.olimex.com/dev/pdf/lpc-p2138.pdf ) as starting point. I've
> connected the TMS,TDI,TCK, TRST and TDO pins to the connector, I've
> connected all power pins to 3.3V or GND, I've connected a cristal between
> X1 and X2 with the capacitors to GND. There are also a pull-up for the
> reset pin and a pull-down for the RTCK pin.
>
> I'm using a wiggler clone made as Leon scheme (with connection between pin
> 8 and 15 of the DB25)
>
> Using an oscilloscope I can see TMS,TDI,TCK and TRST move when I try to
> connect to the processor using OpenOCD, H-Tag or OCD Commander.
>
> The TDO pin is high and doesn't move.
>
> Do someone have an idea of what could be the problem?

You need to have TRST and DBGSEL tied high. Have you got TRST confused with
nRST? nRST is used by the JTAG, not TRST.

Leon
In data 07 novembre 2006 alle ore 12:39:25, Leon Heller
ha scritto:

> ----- Original Message -----
> From:
> To:
> Sent: Tuesday, November 07, 2006 8:50 AM
> Subject: [lpc2000] LPC2138 JTAG connection problem
>> Hi Guys,
>>
>> I've made a board with a lpc2138 and a 20-pin jtag connector.
>> I've used the schematic of olimex dev board
>> ( http://www.olimex.com/dev/pdf/lpc-p2138.pdf ) as starting point. I've
>> connected the TMS,TDI,TCK, TRST and TDO pins to the connector, I've
>> connected all power pins to 3.3V or GND, I've connected a cristal
>> between
>> X1 and X2 with the capacitors to GND. There are also a pull-up for the
>> reset pin and a pull-down for the RTCK pin.
>>
>> I'm using a wiggler clone made as Leon scheme (with connection between
>> pin
>> 8 and 15 of the DB25)
>>
>> Using an oscilloscope I can see TMS,TDI,TCK and TRST move when I try to
>> connect to the processor using OpenOCD, H-Tag or OCD Commander.
>>
>> The TDO pin is high and doesn't move.
>>
>> Do someone have an idea of what could be the problem?
>
> You need to have TRST and DBGSEL tied high. Have you got TRST confused
> with
> nRST? nRST is used by the JTAG, not TRST.
>
> Leon
Hi Michele,

There is no DBGSEL pin on lpc2138, I think Leon was referring to
either the P1.26/RTCK pin or DBG jumper on Olimex schematic.
>From your description looks like you have pins tied correctly but
2 things can go wrong:

1 JTAG pins are not in debug mode (see the procedure below to
verify that)

2 Program running on the microcontroller disables JTAG pins by
writing to PINSEL2
elektrknight
--------------------------
Embedded IDE and BASIC Compiler for ARM based microcontrollers
http://www.hbbrbasic.com/

--------------------------
Below is the procedure to check if pins are in debug mode,
see also this thread for a similar problem:

http://tech.groups.yahoo.com/group/lpc2000/message/19262

For JTAG to work pins P1.27 through P1.32 have to be in the debug
mode. Try following procedure to isolate the problem and verify
that JTAG pins do come up in debug mode after RESET.

- Disconnect JTAG probe from the board

- Pull p1.26 (RTCK) high or leave it disconnected
- RESET the chip

Both TDO P1.27 and TDI P1.28 should be high around 3.3V

- Pull p1.26 (RTCK) low
- RESET the chip

TDO P1.27 should be low < 0.5V
TDI P1.28 should be high around 3.3V

If you get result as above then you know that manual RESET will
bring JTAG pins in debug mode and your board is probably OK.

If you do not then it is something on the board. Duble check
pull-up resistors.

--- In l..., michele_pierasco@... wrote:

> > Subject: [lpc2000] LPC2138 JTAG connection problem
> >
> >
> >> Hi Guys,
> >>
> >> I've made a board with a lpc2138 and a 20-pin jtag connector.
> >> I've used the schematic of olimex dev board
> >> ( http://www.olimex.com/dev/pdf/lpc-p2138.pdf ) as starting
point. I've
> >> connected the TMS,TDI,TCK, TRST and TDO pins to the connector, I've
> >> connected all power pins to 3.3V or GND, I've connected a cristal
> >> between
> >> X1 and X2 with the capacitors to GND. There are also a pull-up
for the
> >> reset pin and a pull-down for the RTCK pin.
> >>
> >> I'm using a wiggler clone made as Leon scheme (with connection
between
> >> pin
> >> 8 and 15 of the DB25)
> >>
> >> Using an oscilloscope I can see TMS,TDI,TCK and TRST move when I
try to
> >> connect to the processor using OpenOCD, H-Tag or OCD Commander.
> >>
> >> The TDO pin is high and doesn't move.
> >>
> >> Do someone have an idea of what could be the problem?
> >
> > You need to have TRST and DBGSEL tied high. Have you got TRST
confused
> > with
> > nRST? nRST is used by the JTAG, not TRST.
> >
> > Leon
> >
> >
> >
> >
> Hi Michele,
>
> There is no DBGSEL pin on lpc2138, I think Leon was referring to
> either the P1.26/RTCK pin or DBG jumper on Olimex schematic.
> From your description looks like you have pins tied correctly but
> 2 things can go wrong:
>
> 1 – JTAG pins are not in debug mode (see the procedure below to
> verify that)
>
> 2 – Program running on the microcontroller disables JTAG pins by
> writing to PINSEL2
> elektrknight
> --------------------------
> Embedded IDE and BASIC Compiler for ARM based microcontrollers
> http://www.hbbrbasic.com/
>
> --------------------------
> Below is the procedure to check if pins are in debug mode,
> see also this thread for a similar problem:
>
> http://tech.groups.yahoo.com/group/lpc2000/message/19262
>
> For JTAG to work pins P1.27 through P1.32 have to be in the debug
> mode. Try following procedure to isolate the problem and verify
> that JTAG pins do come up in debug mode after RESET.
>
> - Disconnect JTAG probe from the board
>
> - Pull p1.26 (RTCK) high or leave it disconnected
> - RESET the chip
>
> Both TDO P1.27 and TDI P1.28 should be high around 3.3V
>
> - Pull p1.26 (RTCK) low
> - RESET the chip
>
> TDO P1.27 should be low < 0.5V
> TDI P1.28 should be high around 3.3V
>
> If you get result as above then you know that manual RESET will
> bring JTAG pins in debug mode and your board is probably OK.
>
> If you do not then it is something on the board. Duble check
> pull-up resistors.

Thank you.
I've removed the JTAG probe and the pull-down from RTCK and reseted the
board, then I've noticed that both TDI and TDO were at about 2V. I've
checked all the power pins, pull-up and pull-down resistor and all were
fine. Then I found that the cristal was not oscillating. The problem was a
broken 30pF capacitor to to ground. I've changed the capacitor and now all
works.
So now I can connect to the micro.

Regards
Michele
Chiacchiera con i tuoi amici in tempo reale!
http://it.messenger.yahoo.com" target="_blank" rel="nofollow">http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
--- In l..., michele_pierasco@... wrote:
>
> > Hi Michele,
...
>
> Thank you.
> I've removed the JTAG probe and the pull-down from RTCK and reseted
the
> board, then I've noticed that both TDI and TDO were at about 2V. I've
> checked all the power pins, pull-up and pull-down resistor and all
were
> fine. Then I found that the cristal was not oscillating. The problem
was a
> broken 30pF capacitor to to ground. I've changed the capacitor and
now all
> works.

I know the pain, problems with oscilator happend to me more
then once. Glad you got it to work!

> So now I can connect to the micro.
>
> Regards
> Michele
> Chiacchiera con i tuoi amici in tempo reale!
> http://it.messenger.yahoo.com" target="_blank" rel="nofollow">http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
>

Cheers,
elektrknight
--------------------------
Embedded IDE and BASIC Compiler for ARM based microcontrollers
http://www.hbbrbasic.com/