EmbeddedRelated.com
Forums
Memfault Beyond the Launch

LPC2368 that won't start without JTAG

Started by Jan Thogersen December 15, 2006
Hi all,

My LPC2368 won't start without the JTAG in use. When I use the JTAG to
download firmware and debug there is no problems, firmware runs
absolutely fine! However, when I disconnect the JTAG and leaves the CPU
on it's own, then nothing happens...The firmware doesn't get executed. I
have checked the reset circuit and it works fine.
To get closer to the answer I tried connecting to the CPU with the flash
utility without JTAG connected. That works fine! I get a connection and
I can download and verify the firmware. But again the CPU won't execute
the firmware!
It's not the bootloader CRC that is the problem, because when firmware
is downloaded and the CPU is reset, I can't get in contact with the
bootloader. So I know that the bootloader tries to start the firmware.

Then my thought's turned against the pull ups and downs on the JTAG
connection. I have pulled the RTCK high to signal that I want the ETM
interface disabled.

TRST, TDI, TMS, TDO, RTCK are being pulled up by a 10k and TCK are being
pulled low.

Someone that has a clue to why this happens?

Thanks in advance!

Regards
Jan

An Engineer's Guide to the LPC2100 Series

If P2.10 is pulled down the bootloader will be invoked and it won't exit.
You can force it to exit in the debugger but it won't exit on its own if
P2.10 is pulled down.

Baldur
> If P2.10 is pulled down the bootloader will be invoked and it won't exit.
> You can force it to exit in the debugger but it won't exit on its own if
> P2.10 is pulled down.

Thanks for your reply!
As also stated in the initial post, I'm sure that the cpu leaves the
bootloader and tries to execute the firmware. Due to the fact that I'm
not able to get in contact with the bootloader after a reset. If I pull
down P2.10 and reset the device, then I have access to the bootloader
ones again.

Regards
Jan
Hi Jan / All,

Was this problem ever resolved? I have a similar problem that I am
having trouble with. My problem is different becauase I am not using
a JTAG interface but a serial cable with the phillips ISP flash
utility instead.

I am running an LPC2368 on a home brew board. I can program the flash
with the phillips flash utility but the chip won't boot.

If I hold down pin 2.10 during reset I can verify that the chip boots
into bootloader mode. If I load a program into flash with an
incorrect vector checksum, I can also verify that, as expected the
chip boots into bootloader mode.

However if I load a program into flash with a correct vector checksum
and pull 2.10 high during reset nothing happens.

Here's the catch - if I run the program manually by using the "Run
>From Address" (0x00) button the program functions perfectly.

Does Jan / Anybody have any ideas about this?

Regards, James Brown
Hi,

One more check you could is to try to program the chip with known
good program. This would eliminate possibility of problems with
the checksums etc.

Do you power off the chip after programming or just reset it?

How many times have you program the chip? Have you erased entire
chip between programming? It is not very likely but I had
misbehaving chips in the past and the only thing that work
was to erase them couple of times. You can also try to
write 0 in the entire flash before erasing.

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

Are you using IAR or Keil compilers?.

If you're using IAR, maybe you can provide your code (a sample of it)
for review and test in our eval board.

Regards,

Alex
Can you check the PLL setting if you use it?
I saw that problem before due to the wrong CCO
and PLL setting. The current chip has a PLL
issue. Please see errata for more details.

PLL clock should be < 290Mhz. Use the PLL setting
in the software example bundle from NXP's website:
http://www.standardics.nxp.com/support/documents/microcontrollers/all
/?scope=LPC2364

Regards,
Tom
Thank you to all who replied to my message. As it turns out it was a
simple case of RTFM.

The basic program that I had loaded into the flash simply toggled an
IO pin to show some output. The problem was that I was using the FAST
IO registers and I had not changed the GPIO module from legacy to FAST
mode.

I am going to blame the bootloader though. I am assuming that it must
leave the GPIO module in legacy mode when doing a normal boot but
leave it in FAST mode when executing a "GO" command. The phillips ISP
flash utility must use the "GO" command to implement the "Execute from
address" function. And hence when I executed my code from the flash
utility everything seemed to work fine.

Sorry to bother yall,
Regards, James Brown
Hi all.
I am running an LPC2368 . I can program the
flash with the phillips flash utility (also with flash magic ) but the chip doesn't boot my program.

I use Sample Code Bundle for LPC23xx Peripherals using Keil's &#956;Vision, V1.10 UART sample from http://www.standardics.nxp.com/support/boards/mcb2300/~LPC2368/.

If I hold down pin 2.10 during reset the chip
boots into bootloader mode.After loaded flash the chip stays bootloader mode don't start my code.I hold hight pin 2.10 during reset and chip does not go out bootloader mode.

i use RealView compiler for above samples.And i can't compiler them with Keil Carm compiler.

I need help about a basic sample(maybe startup and uart) for lpc2368 or any idea.

So thanks

Mehmet Kurnaz
Hi,

have you confirmed that the flash write has correctly included the checksum
for the binary? One of the reasons the bootloader will not run code is if it
finds an incorrect checksum...

Andy

Memfault Beyond the Launch