Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | Re: Re: about PLL of LPC2378

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

about PLL of LPC2378 - sukhdeep singh - Nov 6 4:16:28 2008

Dear Sir,=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 i have written th=
e following code. when i debug it is working fine. but when i program the L=
PC2378. it is not working.kindly help me.i have written the following codes=
.#include "hardware.h"void clock_settings(void);
void pll_settings(void);
void power_control(void);

void delay(unsigned long);
void delay_ms(unsigned long);
void delay_s(unsigned char);

int main()
{ MAMCR=3D0;
=C2=A0MAMTIM=3D4;
=C2=A0MAMCR=3D2;
=C2=A0clock_settings();
// power_control();

=C2=A0FIO2DIR=3D(1<<0)|(1<<1)|(1<<2)|(1<<3);
=C2=A0while(1)
=C2=A0{ FIO2SET=3D(1<<0)|(1<<1)|(1<<2)|(1<<3);
=C2=A0=20
=C2=A0 delay_s(1);
=C2=A0 FIO2CLR=3D(1<<0);
=C2=A0=20
=C2=A0 delay_s(1);
=C2=A0 FIO2CLR=3D(1<<1);
=C2=A0=20
=C2=A0 delay_s(1);
=C2=A0 FIO2CLR=3D(1<<2);
=C2=A0=20
=C2=A0 delay_s(1);
=C2=A0 FIO2CLR=3D(1<<3);
=C2=A0=20
=C2=A0 delay_s(1);
=C2=A0}
}

void power_control(void)
{ PCONP=3D(1<<1)|(1<<2)|(1<<3)|(1<<6)|(1<<7)|(1<<22)|(1<<23)|(1<<27);
}
void clock_settings(void)
{ CCLKCFG=3D0X7;
=C2=A0pll_settings();
=C2=A0PCLKSEL0=3D(3< =C2=A0PCLKSEL1=3D(3< }
void pll_settings(void)
{ PLLCON=3D0;
=C2=A0PLLFEED=3D0XAA;
=C2=A0PLLFEED=3D0X55;

=C2=A0PLLCFG=3D23|0<<16;
=C2=A0PLLFEED=3D0XAA;
=C2=A0PLLFEED=3D0X55;

=C2=A0PLLCON=3D1;
=C2=A0PLLFEED=3D0XAA;
=C2=A0PLLFEED=3D0X55;

=C2=A0PLLCON=3D3;
=C2=A0PLLFEED=3D0XAA;
=C2=A0PLLFEED=3D0X55;
}
void delay(unsigned long d)
{ for(;d>0;d--);
}
void delay_ms(unsigned long ms)
{ for(;ms>0;ms--)
=C2=A0 delay(13267);
}
void delay_s(unsigned char s)
{ for(;s>0;s--)
=C2=A0 delay_ms(1000);
}

& header file contain#include

#define I2EN 6
#define STA 5
#define STO 4
#define SI 3
#define AA 2

/*********PCLKSEL0***********/

#define TIMER0 2
#define TIMER1 4
#define USART0 6
#define I2C0 14

/*******PCLKSEL1************/

#define I2S 22
#define TIMER2 12
#define TIMER3 14

#define SDA0 22
#define SCL0 24

/***********LCD Connections*****************/

#define REG 1
#define CMD 2

#define LCD_CONTROL_SET IOSET1
#define LCD_CONTROL_CLR IOCLR1
#define LCD_CONTROL_DIR IODIR1

#define DATA 14
#define RS 10
#define EN 11

#define LINE1 0X80
#define LINE2 0X94
#define LINE3 0XC0
#define LINE4 0XD4

From Chandigarh to Chennai - find friends all over India. Go to http:=
//in.promos.yahoo.com/groups/citygroups/

[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: about PLL of LPC2378 - Cool Dude - Nov 7 0:03:58 2008

Which IDE are you using. Since your code is not working I suggest you to to=
test your code little by little.. I would like you to see if your PLL conf=
iguration works properly by displaying a single LED because high end LPC's =
have a different a configuration for PLL than lower end LPC's. Chances of m=
aking mistakes would be high. Comment out MAM and LCD's and include them la=
ter if you feel what you have done is right

Raj

--- On Thu, 11/6/08, sukhdeep singh wrote:
From: sukhdeep singh
Subject: [lpc2000] about PLL of LPC2378
To: "NXP"
Date: Thursday, November 6, 2008, 2:45 PM

=20=20=20=20
Dear Sir,=A0 =A0 =A0 =A0 =A0 =A0 =A0 i have written the followi=
ng code. when i debug it is working fine. but when i program the LPC2378. i=
t is not working.kindly help me.i have written the following codes.#include=
"hardware.h" void clock_settings( void);

void pll_settings( void);

void power_control( void);

void delay(unsigned long);

void delay_ms(unsigned long);

void delay_s(unsigned char);

int main()

{ MAMCR=3D0;

=A0MAMTIM=3D4;

=A0MAMCR=3D2;

=A0clock_settings( );

// power_control( );

=A0FIO2DIR=3D(1<< 0)|(1<<1) |(1<<2)|( 1<<3);

=A0while(1)

=A0{ FIO2SET=3D(1<< 0)|(1<<1) |(1<<2)|( 1<<3);

=A0=20

=A0 delay_s(1);

=A0 FIO2CLR=3D(1<< 0);

=A0=20

=A0 delay_s(1);

=A0 FIO2CLR=3D(1<< 1);

=A0=20

=A0 delay_s(1);

=A0 FIO2CLR=3D(1<< 2);

=A0=20

=A0 delay_s(1);

=A0 FIO2CLR=3D(1<< 3);

=A0=20

=A0 delay_s(1);

=A0}

}

void power_control( void)

{ PCONP=3D(1<<1) |(1<<2)|( 1<<3)|(1< <6)|(1<<7) |(1<<22)| (1<<23)|( 1<<27);

}

void clock_settings( void)

{ CCLKCFG=3D0X7;

=A0pll_settings( );

=A0PCLKSEL0=3D(3<
=A0PCLKSEL1=3D(3<
}

void pll_settings( void)

{ PLLCON=3D0;

=A0PLLFEED=3D0XAA;

=A0PLLFEED=3D0X55;

=A0PLLCFG=3D23|0< <16;

=A0PLLFEED=3D0XAA;

=A0PLLFEED=3D0X55;

=A0PLLCON=3D1;

=A0PLLFEED=3D0XAA;

=A0PLLFEED=3D0X55;

=A0PLLCON=3D3;

=A0PLLFEED=3D0XAA;

=A0PLLFEED=3D0X55;

}

void delay(unsigned long d)

{ for(;d>0;d-- );

}

void delay_ms(unsigned long ms)

{ for(;ms>0;ms- -)

=A0 delay(13267) ;

}

void delay_s(unsigned char s)

{ for(;s>0;s-- )

=A0 delay_ms(1000) ;

}

& header file contain#include< lpc23xx.h>

#define I2EN 6

#define STA 5

#define STO 4

#define SI 3

#define AA 2

/*********PCLKSEL0* ********* */

#define TIMER0 2

#define TIMER1 4

#define USART0 6

#define I2C0 14

/*******PCLKSEL1* ********* **/

#define I2S 22

#define TIMER2 12

#define TIMER3 14

#define SDA0 22

#define SCL0 24

/*********** LCD Connections* ********* *******/

#define REG 1

#define CMD 2

#define LCD_CONTROL_ SET IOSET1

#define LCD_CONTROL_ CLR IOCLR1

#define LCD_CONTROL_ DIR IODIR1

#define DATA 14

#define RS 10

#define EN 11

#define LINE1 0X80

#define LINE2 0X94

#define LINE3 0XC0

#define LINE4 0XD4

>From Chandigarh to Chennai - find friends all over India. Go to http://in.p=
romos. yahoo.com/ groups/citygroup s/

[Non-text portions of this message have been removed]

=20=20=20=20=20=20

=20=20=20=20
=20=20=20=20
=09
=09=20
=09
=09

=09
=09
=09
=20=20=20=20=20=20

[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Olimex LPC-E2468 JTAG Debug - Bruce Paterson - Nov 7 1:45:42 2008

Hi all,

I'm having real problems getting debugging going with the Olimex
LPC-E2468 card (PC host) and after one of those frustrating sorts of
days I'm looking for some pointers where to go next.

History:
I've been using Eclipse with Openocd and an Amontec JTAGKey for some
years now with various LPC2138 and LPC2148 custom targets, and after
some initial problems have largely been happy with the setup. (An
Amontec died at one stage and had to buy another, but suspect static
damage).
I stayed with the 2006 version of openocd I had at the time as it worked
OK.

Now:
Trying to get a couple of lpc2468 Olimex cards going (prior to custom),
but it hasn't been clear sailing, and I'm not quite sure why !
At the same time bought a couple of Olimex ARM-USB-OCD debug dongles to
supplement the Amontec due to the number of new projects.

What works:
The old "2006 openocd", JTAGKey and LPC2148 custom target: Obviously,
that's what I've been using.
The brand new 717 2008 openocd off Yagarto site, JTAGKey and LPC2148
works also (more info messages etc than before)

What doesn't work:
The "2007 openocd", JTAGKey and LPC2148. That openocd comes with Olimex
CDs. (Just note this one in passing).
717 openocd, JTAGKey and LPC-E2468 card (debug below).
717 openocd, ARM-USB-OCD and LPC-E2468 card (debug below).
717 openocd, ARM-USB-OCD and LPC-2148 card that works above (debug
below).
Old 2006 openocd, JTAGKey and LPC-E2468 (I tried everything!).

In summary:
JTAGKey can work with 2148 but not E2468
ARM-USB-OCD works with neither.

I must be doing something very wrong !

It seems where the *.cfg files live in the openocd tree has changed for
the different openocd versions, but assume I've picked the appropriate
one for the particular JTAG USB dongle in each case.

I have 2 LPC-E2468 cards. One still has the supplied Linux/U-boot etc on
board, the other has our custom hex file programmed via FlashMagic and
the FT232 Uart on card. Since I don't get openocd to start successfully
this may not be relevant. I sometimes get different debug output
depending on whether I power the card or the dongle first.

Debug from Eclipse console:

With Amontec JTAGKey and E248:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown
EmbeddedICE version (comms ctrl: 0x00000000)
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Warning: jtag.c:1211 jtag_check_value(): value captured during scan
didn't pass the requested check: captured: 0x0f check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed
check

With Amontec JTAGKey and E248 (same as above but different powering
attempt):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE
version 7 detected, EmbeddedICE handling might be broken
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: jtag.c:1211 jtag_check_value(): value captured during scan
didn't pass the requested check: captured: 0x0f check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed
check
Warning: jtag.c:1211 jtag_check_value(): value captured during scan
didn't pass the requested check: captured: 0x0f check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed
check
Error: armv4_5.h:114 armv4_5_mode_to_number(): invalid mode value
encountered
Error: arm7_9_common.c:1102 arm7_9_debug_entry(): cpsr contains
invalid mode value - communication failure
Warning: arm7_9_common.c:970 arm7_9_halt(): target was in unknown state
when halt was requested
Warning: arm7_9_common.c:700 arm7_9_poll(): DBGACK set while target was
in unknown state. Reset or initialize target.

With Amontec JTAGKey and E248 (same as above but different card):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE
version 7 detected, EmbeddedICE handling might be broken
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
User: target.c:436 target_process_reset(): Timed out waiting for halt
after reset
^^^^
Looks like it *nearly* gets there this time, but still can't halt =>
starting gdb useless. No idea what is different this time from last time
really.
With ARM-USB-OCD & E2468:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown
EmbeddedICE version (comms ctrl: 0x00000000)
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...

With ARM-USB-OCD & E2468 (different card):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE
version 7 detected, EmbeddedICE handling might be broken
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
User: target.c:436 target_process_reset(): Timed out waiting for halt
after reset

With ARM-USB-OCD & LPC2148:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,
exit
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,
exit
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,
exit

With ARM-USB-OCD & LPC2148:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown
EmbeddedICE version (comms ctrl: 0x00000000)
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
User: target.c:436 target_process_reset(): Timed out waiting for halt
after reset
So,

Is the JTAG on a 2148 and 2468 processor identical ? (ie. If it works
for 2148 it should for 2468 ?)
It is something to do with SRST and TRST timing / relationship ?
Has anyone got a JTAGKey or an ARM-USB-OCD working with an Olimex
LPC-E2468 card ? Need to add an extra pullup/pulldown somewhere maybe ?
A bit Frustrated,
Bruce

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: about PLL of LPC2378 - "benedikt.sauter" - Nov 7 17:03:45 2008

can you send me your project folder? I can try to help you because I
start also at the moment with the lpc2478.

s...@ixbat.de

regards benedikt

--- In l...@yahoogroups.com, Cool Dude wrote:
>
> Which IDE are you using. Since your code is not working I suggest
you to to test your code little by little.. I would like you to see if
your PLL configuration works properly by displaying a single LED
because high end LPC's have a different a configuration for PLL than
lower end LPC's. Chances of making mistakes would be high. Comment out
MAM and LCD's and include them later if you feel what you have done is
right
>=20
> Raj
>=20
> --- On Thu, 11/6/08, sukhdeep singh wrote:
> From: sukhdeep singh
> Subject: [lpc2000] about PLL of LPC2378
> To: "NXP"
> Date: Thursday, November 6, 2008, 2:45 PM
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20=20=20=20=20
> Dear Sir,=A0 =A0 =A0 =A0 =A0 =A0 =A0 i have written the follo=
wing
code. when i debug it is working fine. but when i program the LPC2378.
it is not working.kindly help me.i have written the following
codes.#include "hardware.h" void clock_settings( void);
>=20
> void pll_settings( void);
>=20
> void power_control( void);
>=20
>=20
>=20
> void delay(unsigned long);
>=20
> void delay_ms(unsigned long);
>=20
> void delay_s(unsigned char);
>=20
>=20
>=20
> int main()
>=20
> { MAMCR=3D0;
>=20
> =A0MAMTIM=3D4;
>=20
> =A0MAMCR=3D2;
>=20
> =A0clock_settings( );
>=20
> // power_control( );
>=20
>=20
>=20
> =A0FIO2DIR=3D(1<< 0)|(1<<1) |(1<<2)|( 1<<3);
>=20
> =A0while(1)
>=20
> =A0{ FIO2SET=3D(1<< 0)|(1<<1) |(1<<2)|( 1<<3);
>=20
> =A0=20
>=20
> =A0 delay_s(1);
>=20
> =A0 FIO2CLR=3D(1<< 0);
>=20
> =A0=20
>=20
> =A0 delay_s(1);
>=20
> =A0 FIO2CLR=3D(1<< 1);
>=20
> =A0=20
>=20
> =A0 delay_s(1);
>=20
> =A0 FIO2CLR=3D(1<< 2);
>=20
> =A0=20
>=20
> =A0 delay_s(1);
>=20
> =A0 FIO2CLR=3D(1<< 3);
>=20
> =A0=20
>=20
> =A0 delay_s(1);
>=20
> =A0}
>=20
> }
>=20
>=20
>=20
> void power_control( void)
>=20
> { PCONP=3D(1<<1) |(1<<2)|( 1<<3)|(1< <6)|(1<<7) |(1<<22)| (1<<23)|(
1<<27);
>=20
> }
>=20
> void clock_settings( void)
>=20
> { CCLKCFG=3D0X7;
>=20
> =A0pll_settings( );
>=20
> =A0PCLKSEL0=3D(3< >=20
> =A0PCLKSEL1=3D(3< >=20
> }
>=20
> void pll_settings( void)
>=20
> { PLLCON=3D0;
>=20
> =A0PLLFEED=3D0XAA;
>=20
> =A0PLLFEED=3D0X55;
>=20
>=20
>=20
> =A0PLLCFG=3D23|0< <16;
>=20
> =A0PLLFEED=3D0XAA;
>=20
> =A0PLLFEED=3D0X55;
>=20
>=20
>=20
> =A0PLLCON=3D1;
>=20
> =A0PLLFEED=3D0XAA;
>=20
> =A0PLLFEED=3D0X55;
>=20
>=20
>=20
> =A0PLLCON=3D3;
>=20
> =A0PLLFEED=3D0XAA;
>=20
> =A0PLLFEED=3D0X55;
>=20
> }
>=20
>=20
>=20
> void delay(unsigned long d)
>=20
> { for(;d>0;d-- );
>=20
> }
>=20
> void delay_ms(unsigned long ms)
>=20
> { for(;ms>0;ms- -)
>=20
> =A0 delay(13267) ;
>=20
> }
>=20
> void delay_s(unsigned char s)
>=20
> { for(;s>0;s-- )
>=20
> =A0 delay_ms(1000) ;
>=20
> }
>=20
>=20
>=20
> & header file contain#include< lpc23xx.h>
>=20
>=20
>=20
> #define I2EN 6
>=20
> #define STA 5
>=20
> #define STO 4
>=20
> #define SI 3
>=20
> #define AA 2
>=20
>=20
>=20
> /*********PCLKSEL0* ********* */
>=20
>=20
>=20
> #define TIMER0 2
>=20
> #define TIMER1 4
>=20
> #define USART0 6
>=20
> #define I2C0 14
>=20
>=20
>=20
> /*******PCLKSEL1* ********* **/
>=20
>=20
>=20
> #define I2S 22
>=20
> #define TIMER2 12
>=20
> #define TIMER3 14
>=20
>=20
>=20
> #define SDA0 22
>=20
> #define SCL0 24
>=20
>=20
>=20
> /*********** LCD Connections* ********* *******/
>=20
>=20
>=20
> #define REG 1
>=20
> #define CMD 2
>=20
>=20
>=20
> #define LCD_CONTROL_ SET IOSET1
>=20
> #define LCD_CONTROL_ CLR IOCLR1
>=20
> #define LCD_CONTROL_ DIR IODIR1
>=20
>=20
>=20
> #define DATA 14
>=20
> #define RS 10
>=20
> #define EN 11
>=20
>=20
>=20
> #define LINE1 0X80
>=20
> #define LINE2 0X94
>=20
> #define LINE3 0XC0
>=20
> #define LINE4 0XD4
>=20
>=20
>=20
> From Chandigarh to Chennai - find friends all over India. Go to
http://in.promos. yahoo.com/ groups/citygroup s/
>=20
>=20
>=20
> [Non-text portions of this message have been removed]
>=20
>=20
>=20
>=20
>=20=20=20=20=20=20=20
>=20
>=20=20=20=20=20
>=20=20=20=20=20
>=20=09
>=20=09=20
>=20=09
>=20=09
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20
>=20=09
>=20
>=20
>=20=09
>=20=09
>=20
>=20
>=20=20=20=20=20=20=20
>=20
> [Non-text portions of this message have been removed]
>

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Re: about PLL of LPC2378 - Cool Dude - Nov 7 23:46:48 2008


This stratup code is for GNU compilers
Raj

--- On Sat, 11/8/08, benedikt.sauter wrote:
From: benedikt.sauter
Subject: [lpc2000] Re: about PLL of LPC2378
To: l...@yahoogroups.com
Date: Saturday, November 8, 2008, 1:17 AM

=20=20=20=20
can you send me your project folder? I can try to help you beca=
use I

start also at the moment with the lpc2478.

sauter@ixbat. de

regards benedikt

--- In lpc2000@yahoogroups .com, Cool Dude wrote:

>

> Which IDE are you using. Since your code is not working I suggest

you to to test your code little by little.. I would like you to see if

your PLL configuration works properly by displaying a single LED

because high end LPC's have a different a configuration for PLL than

lower end LPC's. Chances of making mistakes would be high. Comment out

MAM and LCD's and include them later if you feel what you have done is

right

>=20

> Raj

>=20

> --- On Thu, 11/6/08, sukhdeep singh wrote:

> From: sukhdeep singh

> Subject: [lpc2000] about PLL of LPC2378

> To: "NXP"

> Date: Thursday, November 6, 2008, 2:45 PM

>=20

>=20

>=20

>=20

>=20

>=20

>=20

>=20

>=20

>=20

>=20=20=20=20=20

> Dear Sir,=A0 =A0 =A0 =A0 =A0 =A0 =A0 i have written the follo=
wing

code. when i debug it is working fine. but when i program the LPC2378.

it is not working.kindly help me.i have written the following

codes.#include "hardware.h" void clock_settings( void);

>=20

> void pll_settings( void);

>=20

> void power_control( void);

>=20

>=20

>=20

> void delay(unsigned long);

>=20

> void delay_ms(unsigned long);

>=20

> void delay_s(unsigned char);

>=20

>=20

>=20

> int main()

>=20

> { MAMCR=3D0;

>=20

> =A0MAMTIM=3D4;

>=20

> =A0MAMCR=3D2;

>=20

> =A0clock_settings( );

>=20

> // power_control( );

>=20

>=20

>=20

> =A0FIO2DIR=3D(1<< 0)|(1<<1) |(1<<2)|( 1<<3);

>=20

> =A0while(1)

>=20

> =A0{ FIO2SET=3D(1<< 0)|(1<<1) |(1<<2)|( 1<<3);

>=20

> =A0=20

>=20

> =A0 delay_s(1);

>=20

> =A0 FIO2CLR=3D(1<< 0);

>=20

> =A0=20

>=20

> =A0 delay_s(1);

>=20

> =A0 FIO2CLR=3D(1<< 1);

>=20

> =A0=20

>=20

> =A0 delay_s(1);

>=20

> =A0 FIO2CLR=3D(1<< 2);

>=20

> =A0=20

>=20

> =A0 delay_s(1);

>=20

> =A0 FIO2CLR=3D(1<< 3);

>=20

> =A0=20

>=20

> =A0 delay_s(1);

>=20

> =A0}

>=20

> }

>=20

>=20

>=20

> void power_control( void)

>=20

> { PCONP=3D(1<<1) |(1<<2)|( 1<<3)|(1< <6)|(1<<7) |(1<<22)| (1<<23)|(

1<<27);

>=20

> }

>=20

> void clock_settings( void)

>=20

> { CCLKCFG=3D0X7;

>=20

> =A0pll_settings( );

>=20

> =A0PCLKSEL0=3D(3<
>=20

> =A0PCLKSEL1=3D(3<
>=20

> }

>=20

> void pll_settings( void)

>=20

> { PLLCON=3D0;

>=20

> =A0PLLFEED=3D0XAA;

>=20

> =A0PLLFEED=3D0X55;

>=20

>=20

>=20

> =A0PLLCFG=3D23|0< <16;

>=20

> =A0PLLFEED=3D0XAA;

>=20

> =A0PLLFEED=3D0X55;

>=20

>=20

>=20

> =A0PLLCON=3D1;

>=20

> =A0PLLFEED=3D0XAA;

>=20

> =A0PLLFEED=3D0X55;

>=20

>=20

>=20

> =A0PLLCON=3D3;

>=20

> =A0PLLFEED=3D0XAA;

>=20

> =A0PLLFEED=3D0X55;

>=20

> }

>=20

>=20

>=20

> void delay(unsigned long d)

>=20

> { for(;d>0;d-- );

>=20

> }

>=20

> void delay_ms(unsigned long ms)

>=20

> { for(;ms>0;ms- -)

>=20

> =A0 delay(13267) ;

>=20

> }

>=20

> void delay_s(unsigned char s)

>=20

> { for(;s>0;s-- )

>=20

> =A0 delay_ms(1000) ;

>=20

> }

>=20

>=20

>=20

> & header file contain#include< lpc23xx.h>

>=20

>=20

>=20

> #define I2EN 6

>=20

> #define STA 5

>=20

> #define STO 4

>=20

> #define SI 3

>=20

> #define AA 2

>=20

>=20

>=20

> /*********PCLKSEL0* ********* */

>=20

>=20

>=20

> #define TIMER0 2

>=20

> #define TIMER1 4

>=20

> #define USART0 6

>=20

> #define I2C0 14

>=20

>=20

>=20

> /*******PCLKSEL1* ********* **/

>=20

>=20

>=20

> #define I2S 22

>=20

> #define TIMER2 12

>=20

> #define TIMER3 14

>=20

>=20

>=20

> #define SDA0 22

>=20

> #define SCL0 24

>=20

>=20

>=20

> /*********** LCD Connections* ********* *******/

>=20

>=20

>=20

> #define REG 1

>=20

> #define CMD 2

>=20

>=20

>=20

> #define LCD_CONTROL_ SET IOSET1

>=20

> #define LCD_CONTROL_ CLR IOCLR1

>=20

> #define LCD_CONTROL_ DIR IODIR1

>=20

>=20

>=20

> #define DATA 14

>=20

> #define RS 10

>=20

> #define EN 11

>=20

>=20

>=20

> #define LINE1 0X80

>=20

> #define LINE2 0X94

>=20

> #define LINE3 0XC0

>=20

> #define LINE4 0XD4

>=20

>=20

>=20

> From Chandigarh to Chennai - find friends all over India. Go to

http://in.promos. yahoo.com/ groups/citygroup s/

>=20

>=20

>=20

> [Non-text portions of this message have been removed]

>=20

>=20

>=20

>=20

>=20=20=20=20=20=20=20

>=20

>=20=20=20=20=20

>=20=20=20=20=20

>=20=09

>=20=09=20

>=20=09

>=20=09

>=20

>=20

>=20

>=20

>=20

>=20

>=20

>=20

>=20=09

>=20

>=20

>=20=09

>=20=09

>=20

>=20

>=20=20=20=20=20=20=20

>=20

> [Non-text portions of this message have been removed]

>

=20=20=20=20=20=20

=20=20=20=20
=20=20=20=20
=09
=09=20
=09
=09

=09
=09
=09
=20=20=20=20=20=20

[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

RE: Olimex LPC-E2468 JTAG Debug: Update - Bruce Paterson - Nov 9 22:59:54 2008

No success yet, but an update.
Any suggestions welcome !

Olimex LPC-E2468:
The R76 value was 100 Ohms, not 100kOhms as shown on the circuit. This
is the RTCLK pullup resister. Not certain if this a show-stopper or not
because still not working, but it certainly wouldn't help !
Anyone else got a LPC-E2468 board they can check to see if 100 Ohms
("101") or whether this was a load error on the oards we've bought ?

Amontec JTAGKey:
* I am able to use the 717 openocd with my original lpc-2148 board as
long as I comment out the 2 "jtag_reset" lines in the config script
lpc2xxx_jtagkey.cfg. The original version of the config file didn't have
these lines. Why ?

* The JTAGKey gets confused if you have *another* FT232 device on the
system, such as the serial port on the LPC-E2468 board ! It finds that
device before finding itself and latches onto that. Only a computer
reboot will kill off openocd in this case. I switched to external
powering on LPC-E2468 when attempting to use the JTAGKey.

* Unfortunately it seems openocd is still unable to "halt" the processor
on the LPC-E2468 card, so it can't really get anywhere.

Cheers,
Bruce

-----Original Message-----
From: l...@yahoogroups.com [mailto:l...@yahoogroups.com] On Behalf
Of Bruce Paterson
Sent: Friday, 7 November 2008 5:46 PM
To: l...@yahoogroups.com
Subject: [lpc2000] Olimex LPC-E2468 JTAG Debug

Hi all,

I'm having real problems getting debugging going with the Olimex
LPC-E2468 card (PC host) and after one of those frustrating sorts of
days I'm looking for some pointers where to go next.

History:
I've been using Eclipse with Openocd and an Amontec JTAGKey for some
years now with various LPC2138 and LPC2148 custom targets, and after
some initial problems have largely been happy with the setup. (An
Amontec died at one stage and had to buy another, but suspect static
damage).
I stayed with the 2006 version of openocd I had at the time as it worked
OK.

Now:
Trying to get a couple of lpc2468 Olimex cards going (prior to custom),
but it hasn't been clear sailing, and I'm not quite sure why !
At the same time bought a couple of Olimex ARM-USB-OCD debug dongles to
supplement the Amontec due to the number of new projects.

What works:
The old "2006 openocd", JTAGKey and LPC2148 custom target: Obviously,
that's what I've been using.
The brand new 717 2008 openocd off Yagarto site, JTAGKey and LPC2148
works also (more info messages etc than before)

What doesn't work:
The "2007 openocd", JTAGKey and LPC2148. That openocd comes with Olimex
CDs. (Just note this one in passing).
717 openocd, JTAGKey and LPC-E2468 card (debug below).
717 openocd, ARM-USB-OCD and LPC-E2468 card (debug below).
717 openocd, ARM-USB-OCD and LPC-2148 card that works above (debug
below).
Old 2006 openocd, JTAGKey and LPC-E2468 (I tried everything!).

In summary:
JTAGKey can work with 2148 but not E2468
ARM-USB-OCD works with neither.

I must be doing something very wrong !

It seems where the *.cfg files live in the openocd tree has changed for
the different openocd versions, but assume I've picked the appropriate
one for the particular JTAG USB dongle in each case.

I have 2 LPC-E2468 cards. One still has the supplied Linux/U-boot etc on
board, the other has our custom hex file programmed via FlashMagic and
the FT232 Uart on card. Since I don't get openocd to start successfully
this may not be relevant. I sometimes get different debug output
depending on whether I power the card or the dongle first.

Debug from Eclipse console:

With Amontec JTAGKey and E248:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown
EmbeddedICE version (comms ctrl: 0x00000000)
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Warning: jtag.c:1211 jtag_check_value(): value captured during scan
didn't pass the requested check: captured: 0x0f check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed
check

With Amontec JTAGKey and E248 (same as above but different powering
attempt):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE
version 7 detected, EmbeddedICE handling might be broken
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: jtag.c:1211 jtag_check_value(): value captured during scan
didn't pass the requested check: captured: 0x0f check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed
check
Warning: jtag.c:1211 jtag_check_value(): value captured during scan
didn't pass the requested check: captured: 0x0f check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed
check
Error: armv4_5.h:114 armv4_5_mode_to_number(): invalid mode value
encountered
Error: arm7_9_common.c:1102 arm7_9_debug_entry(): cpsr contains
invalid mode value - communication failure
Warning: arm7_9_common.c:970 arm7_9_halt(): target was in unknown state
when halt was requested
Warning: arm7_9_common.c:700 arm7_9_poll(): DBGACK set while target was
in unknown state. Reset or initialize target.

With Amontec JTAGKey and E248 (same as above but different card):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE
version 7 detected, EmbeddedICE handling might be broken
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
User: target.c:436 target_process_reset(): Timed out waiting for halt
after reset
^^^^
Looks like it *nearly* gets there this time, but still can't halt =>
starting gdb useless. No idea what is different this time from last time
really.
With ARM-USB-OCD & E2468:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown
EmbeddedICE version (comms ctrl: 0x00000000)
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...

With ARM-USB-OCD & E2468 (different card):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE
version 7 detected, EmbeddedICE handling might be broken
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
User: target.c:436 target_process_reset(): Timed out waiting for halt
after reset

With ARM-USB-OCD & LPC2148:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,
exit
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,
exit
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,
exit

With ARM-USB-OCD & LPC2148:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown
EmbeddedICE version (comms ctrl: 0x00000000)
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
User: target.c:436 target_process_reset(): Timed out waiting for halt
after reset
So,

Is the JTAG on a 2148 and 2468 processor identical ? (ie. If it works
for 2148 it should for 2468 ?)
It is something to do with SRST and TRST timing / relationship ?
Has anyone got a JTAGKey or an ARM-USB-OCD working with an Olimex
LPC-E2468 card ? Need to add an extra pullup/pulldown somewhere maybe ?
A bit Frustrated,
Bruce

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

RE: Olimex LPC-E2468 JTAG Debug: Update - Bruce Paterson - Nov 10 2:00:33 2008

To continue my monologue, in case anyone is interested :)

I now have debugging working somewhat on the LPC-E2468 board, both with
the JTAGKey and the ARM-USB-OCD dongles.

The reason for the problem (other than the 2 things noted earlier
below), was my program on card 1 was going off into the weeds (TBD why)
and disabling JTAG. [Discovered by switching JTAG to boundary scan using
the DBGSEL pin and openocd could see it, but not the uP JTAG...ahha!].
I thought I'd eliminated this possibility on card 2 by leaving it with
original Olimex supplied code, but alas this must also affect the JTAG
pins. Grrr my bad.

Still can't get the ARM-USB-OCD working on the lpc-2148 original card.
Openocd throws up all sorts of problems. JTAGKey works fine. Of course I
tried commenting out the "jtag-reset" lines in the armusbocd.cfg file as
well (see below) but it didn't help. It'd be nice to know why it doesn't
work, but not as immediately critical.

Cheers,
Bruce

-----Original Message-----
From: l...@yahoogroups.com [mailto:l...@yahoogroups.com] On Behalf
Of Bruce Paterson
Sent: Monday, 10 November 2008 3:00 PM
To: l...@yahoogroups.com
Subject: RE: [lpc2000] Olimex LPC-E2468 JTAG Debug: Update

No success yet, but an update.
Any suggestions welcome !

Olimex LPC-E2468:
The R76 value was 100 Ohms, not 100kOhms as shown on the circuit. This
is the RTCLK pullup resister. Not certain if this a show-stopper or not
because still not working, but it certainly wouldn't help !
Anyone else got a LPC-E2468 board they can check to see if 100 Ohms
("101") or whether this was a load error on the oards we've bought ?

Amontec JTAGKey:
* I am able to use the 717 openocd with my original lpc-2148 board as
long as I comment out the 2 "jtag_reset" lines in the config script
lpc2xxx_jtagkey.cfg. The original version of the config file didn't have
these lines. Why ?

* The JTAGKey gets confused if you have *another* FT232 device on the
system, such as the serial port on the LPC-E2468 board ! It finds that
device before finding itself and latches onto that. Only a computer
reboot will kill off openocd in this case. I switched to external
powering on LPC-E2468 when attempting to use the JTAGKey.

* Unfortunately it seems openocd is still unable to "halt" the processor
on the LPC-E2468 card, so it can't really get anywhere.

Cheers,
Bruce

-----Original Message-----
From: l...@yahoogroups.com [mailto:l...@yahoogroups.com] On Behalf
Of Bruce Paterson
Sent: Friday, 7 November 2008 5:46 PM
To: l...@yahoogroups.com
Subject: [lpc2000] Olimex LPC-E2468 JTAG Debug

Hi all,

I'm having real problems getting debugging going with the Olimex
LPC-E2468 card (PC host) and after one of those frustrating sorts of
days I'm looking for some pointers where to go next.

History:
I've been using Eclipse with Openocd and an Amontec JTAGKey for some
years now with various LPC2138 and LPC2148 custom targets, and after
some initial problems have largely been happy with the setup. (An
Amontec died at one stage and had to buy another, but suspect static
damage).
I stayed with the 2006 version of openocd I had at the time as it worked
OK.

Now:
Trying to get a couple of lpc2468 Olimex cards going (prior to custom),
but it hasn't been clear sailing, and I'm not quite sure why !
At the same time bought a couple of Olimex ARM-USB-OCD debug dongles to
supplement the Amontec due to the number of new projects.

What works:
The old "2006 openocd", JTAGKey and LPC2148 custom target: Obviously,
that's what I've been using.
The brand new 717 2008 openocd off Yagarto site, JTAGKey and LPC2148
works also (more info messages etc than before)

What doesn't work:
The "2007 openocd", JTAGKey and LPC2148. That openocd comes with Olimex
CDs. (Just note this one in passing).
717 openocd, JTAGKey and LPC-E2468 card (debug below).
717 openocd, ARM-USB-OCD and LPC-E2468 card (debug below).
717 openocd, ARM-USB-OCD and LPC-2148 card that works above (debug
below).
Old 2006 openocd, JTAGKey and LPC-E2468 (I tried everything!).

In summary:
JTAGKey can work with 2148 but not E2468
ARM-USB-OCD works with neither.

I must be doing something very wrong !

It seems where the *.cfg files live in the openocd tree has changed for
the different openocd versions, but assume I've picked the appropriate
one for the particular JTAG USB dongle in each case.

I have 2 LPC-E2468 cards. One still has the supplied Linux/U-boot etc on
board, the other has our custom hex file programmed via FlashMagic and
the FT232 Uart on card. Since I don't get openocd to start successfully
this may not be relevant. I sometimes get different debug output
depending on whether I power the card or the dongle first.

Debug from Eclipse console:

With Amontec JTAGKey and E248:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown
EmbeddedICE version (comms ctrl: 0x00000000)
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Warning: jtag.c:1211 jtag_check_value(): value captured during scan
didn't pass the requested check: captured: 0x0f check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed
check

With Amontec JTAGKey and E248 (same as above but different powering
attempt):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE
version 7 detected, EmbeddedICE handling might be broken
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: jtag.c:1211 jtag_check_value(): value captured during scan
didn't pass the requested check: captured: 0x0f check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed
check
Warning: jtag.c:1211 jtag_check_value(): value captured during scan
didn't pass the requested check: captured: 0x0f check_value: 0x01
check_mask: 0x0f
Warning: jtag.c:1171 jtag_read_buffer(): in_handler reported a failed
check
Error: armv4_5.h:114 armv4_5_mode_to_number(): invalid mode value
encountered
Error: arm7_9_common.c:1102 arm7_9_debug_entry(): cpsr contains
invalid mode value - communication failure
Warning: arm7_9_common.c:970 arm7_9_halt(): target was in unknown state
when halt was requested
Warning: arm7_9_common.c:700 arm7_9_poll(): DBGACK set while target was
in unknown state. Reset or initialize target.

With Amontec JTAGKey and E248 (same as above but different card):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE
version 7 detected, EmbeddedICE handling might be broken
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
User: target.c:436 target_process_reset(): Timed out waiting for halt
after reset
^^^^
Looks like it *nearly* gets there this time, but still can't halt =>
starting gdb useless. No idea what is different this time from last time
really.
With ARM-USB-OCD & E2468:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown
EmbeddedICE version (comms ctrl: 0x00000000)
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...

With ARM-USB-OCD & E2468 (different card):

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
Warning: embeddedice.c:185 embeddedice_build_reg_cache(): EmbeddedICE
version 7 detected, EmbeddedICE handling might be broken
Info: jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x4f1f0f0f
(Manufacturer: 0x787, Part: 0xf1f0, Version: 0x4)
User: target.c:436 target_process_reset(): Timed out waiting for halt
after reset

With ARM-USB-OCD & LPC2148:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,
exit
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,
exit
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan
chain, IR mismatch, scan returned 0x3f
Error: jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain,
exit

With ARM-USB-OCD & LPC2148:

Open On-Chip Debugger (2008-06-19 19:00) svn: 717
URL: http://svn.berlios.de/svnroot/repos/openocd/trunk
Info: options.c:50 configuration_output_handler(): jtag_speed: 3, 3
Info: options.c:50 configuration_output_handler(): Open On-Chip
Debugger (2008-06-19 19:00) svn: 717
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
Error: embeddedice.c:191 embeddedice_build_reg_cache(): unknown
EmbeddedICE version (comms ctrl: 0x00000000)
Error: jtag.c:1351 jtag_examine_chain(): JTAG communication failure,
check connection, JTAG interface, target power etc.
Error: jtag.c:1556 jtag_init_inner(): trying to validate configured
JTAG chain anyway...
User: target.c:436 target_process_reset(): Timed out waiting for halt
after reset
So,

Is the JTAG on a 2148 and 2468 processor identical ? (ie. If it works
for 2148 it should for 2468 ?)
It is something to do with SRST and TRST timing / relationship ?
Has anyone got a JTAGKey or an ARM-USB-OCD working with an Olimex
LPC-E2468 card ? Need to add an extra pullup/pulldown somewhere maybe ?
A bit Frustrated,
Bruce

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )