Yahoo Groups archive

Lpc2000

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

Thread

LPC2106 Secondary JTAG problems.

LPC2106 Secondary JTAG problems.

2006-05-31 by Richard

I am having problems to the 2106 using the secondary JTAG, this is on
a prototype board.  Keil gives me the message:

 "Couldn't stop the ARM device.  Check the JTAG cable"

The particulars:

Keil IDE
DBGSEL is pulled low.
RTCK is pulled low
TRST, TDI, TDO, and TMS are pulled high
TCK is pulled low
14.7456 MHz Xtal

I have used this setup in two ther designs without problems.  I
configure PINSEL2 to 0x55400000 as I always have.

I have slow the JTAG as slow as it will go.  I can see all the signals
active on the logic analyser.  

Ideas?

Thanks

Rich

Re: [lpc2000] LPC2106 Secondary JTAG problems.

2006-05-31 by Tom Walsh

Richard wrote:

>I am having problems to the 2106 using the secondary JTAG, this is on
>a prototype board.  Keil gives me the message:
>
> "Couldn't stop the ARM device.  Check the JTAG cable"
>
>The particulars:
>
>Keil IDE
>DBGSEL is pulled low.
>RTCK is pulled low
>TRST, TDI, TDO, and TMS are pulled high
>TCK is pulled low
>14.7456 MHz Xtal
>
>I have used this setup in two ther designs without problems.  I
>configure PINSEL2 to 0x55400000 as I always have.
>
>I have slow the JTAG as slow as it will go.  I can see all the signals
>active on the logic analyser.  
>
>  
>
That sounds odd, there should be a DELAY setting someplace.  At least I 
have this with the Abatron BDI2000, I can assert a RESET for a specific 
interval, then a DELAY before it attempts to connect.

Sounds like that Keil is attempting to connect the JTAG immediately 
after releasing the RESET.  As you know, with the secondary JTAG of the 
LPC2106, you have to enable the secondary JTAG, then (I do this) put a 
short delay loop in before the actual startup code to allow the BDI2000 
to "catch" the processor before it runs the actual code.

TomW

-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

Re: LPC2106 Secondary JTAG problems.

2006-05-31 by Richard

In the JTAG2 enable code I removed any startup code and added a delay
after assigned PINSEL1.  Still no luck.  Ugh, I hate spending all this
time on something that has worked before.  What am I missing............


Rich


--- In lpc2000@yahoogroups.com, Tom Walsh <tom@...> wrote:
Show quoted textHide quoted text
>
> Richard wrote:
> 
> >I am having problems to the 2106 using the secondary JTAG, this is on
> >a prototype board.  Keil gives me the message:
> >
> > "Couldn't stop the ARM device.  Check the JTAG cable"
> >
> >The particulars:
> >
> >Keil IDE
> >DBGSEL is pulled low.
> >RTCK is pulled low
> >TRST, TDI, TDO, and TMS are pulled high
> >TCK is pulled low
> >14.7456 MHz Xtal
> >
> >I have used this setup in two ther designs without problems.  I
> >configure PINSEL2 to 0x55400000 as I always have.
> >
> >I have slow the JTAG as slow as it will go.  I can see all the signals
> >active on the logic analyser.  
> >
> >  
> >
> That sounds odd, there should be a DELAY setting someplace.  At least I 
> have this with the Abatron BDI2000, I can assert a RESET for a specific 
> interval, then a DELAY before it attempts to connect.
> 
> Sounds like that Keil is attempting to connect the JTAG immediately 
> after releasing the RESET.  As you know, with the secondary JTAG of the 
> LPC2106, you have to enable the secondary JTAG, then (I do this) put a 
> short delay loop in before the actual startup code to allow the BDI2000 
> to "catch" the processor before it runs the actual code.
> 
> TomW
> 
> -- 
> Tom Walsh - WN3L - Embedded Systems Consultant
> http://openhardware.net, http://cyberiansoftware.com
> "Windows? No thanks, I have work to do..."
> ----------------------------------------------------
>

Re: [lpc2000] Re: LPC2106 Secondary JTAG problems.

2006-06-01 by Tom Walsh

Richard wrote:

>In the JTAG2 enable code I removed any startup code and added a delay
>after assigned PINSEL1.  Still no luck.  Ugh, I hate spending all this
>time on something that has worked before.  What am I missing............
>
>  
>

This is my start code, perhaps this will jog your memory?

============= begin crt0.S ==============
...
...
...
        .text
        .code 32
        .align 2

        .global _boot
        .func   _boot
_boot:

// Runtime Interrupt Vectors
// -------------------------
Vectors:
        b     _start                    // reset - _start
        ldr   pc,_undf                  // undefined - _undf
        ldr   pc,_swi                   // SWI - _swi
        ldr   pc,_pabt                  // program abort - _pabt
        ldr   pc,_dabt                  // data abort - _dabt
        nop                             // reserved
        ldr   pc,[pc,#-0xFF0]           // IRQ - read the VIC
        ldr   pc,_fiq                   // FIQ - _fiq

#if 0
// Use this group for production
_undf:  .word _reset                    // undefined - _reset
_swi:   .word _reset                    // SWI - _reset
_pabt:  .word _reset                    // program abort - _reset
_dabt:  .word _reset                    // data abort - _reset
_irq:   .word _reset                    // IRQ - _reset
_fiq:   .word _reset                    // FIQ - _reset

#else
// Use this group for development
_undf:  .word __undf                    // undefined
_swi:   .word __swi                     // SWI
_pabt:  .word __pabt                    // program abort
_dabt:  .word __dabt                    // data abort
_irq:   .word __irq                     // IRQ
_fiq:   .word __fiq                     // FIQ

__undf: b     .                         // undefined
__swi:  b     .                         // SWI
__pabt: b     .                         // program abort
__dabt: b     .                         // data abort
__irq:  b     .                         // IRQ
__fiq:  b     .                         // FIQ
#endif

JTAG2:
    .word    0x55400000
PINSELREG:
    .word    0xe002c004

        .size _boot, . - _boot
        .endfunc


// Setup the operating mode & stack.
// ---------------------------------
        .global _start, start, _mainCRTStartup
        .func   _start

_start:
start:
_mainCRTStartup:

// Initialize Interrupt System
// - Set stack location for each mode
// - Leave in System Mode with Interrupts Disabled
// -----------------------------------------------
;
        ldr    r0, JTAG2
        ldr    r1, PINSELREG
        str    r0, [r1]            // activate secondary JTAG port.
;
        mov    r3, #0x10000
startdelay:
        subs    r3, r3, #1
        bne    startdelay        // give debugger time to catch us.
;
        ldr   r0,=_stack
        msr   CPSR_c,#MODE_UND|I_BIT|F_BIT // Undefined Instruction Mode
        mov   sp,r0
        sub   r0,r0,#UND_STACK_SIZE
        msr   CPSR_c,#MODE_ABT|I_BIT|F_BIT // Abort Mode
        mov   sp,r0
        sub   r0,r0,#ABT_STACK_SIZE
...
...
...
============ snip ====================

-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

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.