Debug access to LPC 1768

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Debug access to LPC 1768

2,162件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hellospencer on Fri Mar 15 13:51:48 MST 2013
Hi everybody,

I've just ran into the "Target marked as not debuggable" problem. The other day it was working flawlessly, but today somehow it started rejecting me. Don't know why.

I'm using a custom LPC 1768 board, LPC-Link, EA 10-20 pin JTAG converter, and the lpcxpresso IDE 5.012 .

After doing some research, I found this article quite helpful. Checking the cause of my problem, this item seems the most likely issue, even if I do not know how this could have happened:


Quote:
The target MCU has been put into a flash protection mode.
[LIST]
[*]For example, with NXP parts, this might mean that you have locked the part via CRP - you may only be able to recover this using FlashMagic over a UART.
[/LIST]

So I tried the trick with the ISP mode, but it doesn't work. The MC seems to boot into ISP mode (and if I remove the P2.10 to GND connection the original image is booting again). However, I do not receive the char for the autobaud that's required for the FlashMagic tool. Even using a Oscilloscope (connected RX, TX, GDN) does not show anything (besides a constant voltage level of 2.2 V). I've also checked the MC pin to pin header connection, that's alright, too.

Any ideas? Thanks a lot!
0 件の賞賛
返信
9 返答(返信)

2,016件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hellospencer on Wed Mar 20 09:11:16 MST 2013
Thanks everybody for your help. It's still not working ;)


Quote:
Did you connect all SWD lines including reset? Since lpcxpresso does not use JTAG



Yes. I beeped  through the pins and the 20-pin JTAG header, to check if a soldering point is broken. Everything worked. Reset (pin 17) is connected and works.


Quote:
Is your application using some of the SWD pins for other functions? Have  you tried erasing the flash image (using FlashMagic) and/or booting  into ISP mode, to see if you still have the same problem?



Nope, SWD pins are not multiplexed on the LPC 1768. This interface uses pins 1-5, 100, and 17. I erased with FlashMagic the entire chip and checked the CRP flags. Problem remains.

Maybe there is something going on inside the chip package. When can get back to the board, I'll try to monitor the swd pins with an oscilloscope, maybe this gives me some clue.

Thanks again, I'll keep you updated.
0 件の賞賛
返信

2,016件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Mar 18 03:43:18 MST 2013
Is your application using some of the SWD pins for other functions? Have you tried erasing the flash image (using FlashMagic) and/or booting into ISP mode, to see if you still have the same problem?
0 件の賞賛
返信

2,016件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by serge on Sat Mar 16 09:00:57 MST 2013
Did you connect all SWD lines including reset? Since lpcxpresso does not use JTAG
0 件の賞賛
返信

2,016件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hellospencer on Fri Mar 15 23:17:37 MST 2013
Still not working:


[LIST]
[*]I've restarted everything, but the problem remains.
[*]Vector catch is enabled right from the start.
[*]FlashMagic can read out and erase the MC.
[*]The program on the chip was working fine (until I erased the flash, of course). Therefore, I doubt there is a power issue.
[*]Tested tool chain, LPC-Link, and program with the 1769 side of the lpcxpresso board: works fine
[/LIST]
[B]Edit:[/B]


Now I've also used the OpenOCD (with my tiny-jtagkey dongle). No luck either.


[B]Edit2:[/B]

I generated a hex from the axf and programmed it successfully using FlashMagic. However, the JTAG interface is not functional. Is there any way to make it working again or is this a permanent failure?

[B]PS[/B]


Quote:
Open On-Chip Debugger 0.4.0 (2010-10-08-15:44)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.berlios.de/doc/doxygen/bugs.html
debug_level: 0
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
trst_and_srst srst_pulls_trst srst_gates_jtag trst_push_pull srst_open_drain
500 kHz
trst_only srst_pulls_trst trst_push_pull
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Command handler execution failed
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
error: -100
Command handler execution failed
make: *** [program-jtagkey] Error 1

0 件の賞賛
返信

2,016件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Mar 15 16:08:17 MST 2013
If you've restarted everything (PC, LPC-link, target...) and FlashMagic is working that sounds like a SWD connection problem or a general hardware problem (power supply...).

Did you enable Vector catch already?
0 件の賞賛
返信

2,016件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hellospencer on Fri Mar 15 15:53:11 MST 2013
Now I managed to use the FlashMagic tool :).  I confused the RX/TX lines between USB converter and UART0 .

However, after erasing the flash, the lpcxpresso IDE is still not capable to program the MC. I still get the same error:


Quote:
Target marked as not debuggable.

I've checked with the FlashMagic tool:

[LIST]
[*]CRP are disabled
[*]All flash banks are cleared
[/LIST]


What else could be the cause? Thanks!




ps: debug log


[SIZE=3]
LPCXpresso Debug Driver v5.0 (Nov 22 2012 08:59:27 build 1083)
Looked for chip XML file in /opt/codered/lpcxpresso5012/lpcxpresso/bin/LPC1768.xml
Looked for vendor directory XML file in /opt/codered/lpcxpresso5012/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in /opt/codered/lpcxpresso5012/lpcxpresso/bin/crt_directory.xml
02: Failed on connect: Ep(01). Target marked as not debuggable.
Emu(0): Connected. Was: None. DpID:     EDB6. Info: LPCLINK_1_1
[/SIZE]
0 件の賞賛
返信

2,016件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Mar 15 14:41:39 MST 2013
Are you sure you've a working UART0 connection and a working UART<->whatever converter?

Are you sure you are sending a 9600 bps '?' to your LPC?
0 件の賞賛
返信

2,016件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hellospencer on Fri Mar 15 14:22:42 MST 2013
I'm using a jumper to draw P2.10 to GND, so it's definitely low.

There is a program executing flawlessly on the chip, so how can the chip be dead?
0 件の賞賛
返信

2,016件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Fri Mar 15 14:06:10 MST 2013
#1 Don't remove GND from ISP pin before you've successfully flashed your chip again ;)

#2 If UART ISP isn't working, your chip is dead :eek:
0 件の賞賛
返信