Em(02) error - can't launch debug. Is LPC locked?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Em(02) error - can't launch debug. Is LPC locked?

1,193 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ziemowit on Tue Sep 18 04:19:18 MST 2012
Hi all!

Finally I faced problem I can't find solution in any thread to.

After some attempts to change clock to watchdog oscillator, I lost connection with my LPCXpresso board. I can't launch neither debug nor program flash mode. Every attempt ends with an error message:

[B]02: Failed on connect: Em(02). MEM-AP is not selected.[/B]

I've tried to recover debug access to target chip, described on CodeRedWiki web page [COLOR=Blue]http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip[/COLOR], but without success.

I've also tried to enter bootloader ISP mode and upload [I]'working'[/I] hex via UART (using Flash Magic tool) but it looks like uC doesn't enter bootloader code: I've 30k pull-up resistors on [COLOR=blue]RST[/COLOR], [COLOR=blue]PIO0.1[/COLOR] (FT/GPIO pad) and [COLOR=blue]PIO0.3[/COLOR] (USB-VBUS pad). I force low level on RST then on PIO0.1 pin (for short time) but when I start upload after that, I receive [COLOR=Red]failed to autobaud[/COLOR] message.
As I found out (in PuTTY terminal), target uC doesn't response to "?" autobaud command.

What can I do more in this case? Is my LPC deadly locked?
Thanx for all replies... (but be lenient for newbie user ;))

(Maybe) important notice: [COLOR=red]LED[/COLOR] is shining all the time, even after bootloader 'entering', but gives weak pale light.
0 Kudos
Reply
4 Replies

1,154 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ziemowit on Tue Sep 18 23:09:24 MST 2012
You're right, Zero. Obviously LPC1114 doesn't have CAN, but I was sure table 159 tells truth. Far, far further in chapter #26 of UM we can read:

[I]If the C_CAN interface is present (LPC11Cx parts), the state of pin PIO0_3 at reset
together with a LOW level on pin PIO0_1 determines whether UART ISP or C_CAN ISP
routines are called:
(...)
[B]Remark: On parts without C_CAN interface, the state of pin PIO0_3 does not matter.[/B][/I]

I really don't know why I had problems with pulled-up PIO0_3. Maybe I just was unlucky ;)
0 Kudos
Reply

1,154 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Sep 18 06:07:44 MST 2012

Quote: Ziemowit
If I understand well, low level calls CAN routine of bootloader, but I pulled down this pin, as you suggested and... it works!!! Now I can upload hex via UART :)



If we are talking about LPC1114 PIO0_3 has no ISP function :p

UM10398 is also user manual for LPC11Cxx MCUs (with CAN bootloader) :)

Since a LPC1114 has neither CAN nor USB PIO0_3 is ISP-useless ;)
0 Kudos
Reply

1,154 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ziemowit on Tue Sep 18 05:51:05 MST 2012
Ad #1 I'm talking about LPCXpresso LPC1114 (sorry)
Ad #2 Nice video :) As I see, pull-ups are not necessary...
Ad #3 :O I took it from LPC111x User Manual (UM10398 Rev. 11), table 159 on page 143:

[I]PIO0_3 — General purpose digital input/output pin. This pin is monitored
during reset: Together with a LOW level on pin PIO0_1, a LOW level starts
the flash ISP command handler via C_CAN and a [COLOR=Red]HIGH level starts the
flash ISP command handler via UART[/COLOR].[/I]

If I understand well, low level calls CAN routine of bootloader, but I pulled down this pin, as you suggested and... it works!!! Now I can upload hex via UART :)

So I have to thank you, Zero :) It seems you're right! But what about NXP doc?
0 Kudos
Reply

1,154 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Tue Sep 18 04:45:40 MST 2012
#1 What are we talking about here ? LPCXpresso1343 hardware or own board?

#2 LED after ISP:  http://youtu.be/chFv1EiZcYo ;)

#3 ISP via UART is working with PIO0_3 low :eek::mad::p

UM10375

Quote:

PIO0_3 — General purpose digital input/output pin. LPC1343 only:
A [COLOR=Red]LOW level on this pin during reset starts the ISP[/COLOR] command  handler, a HIGH level starts the USB device enumeration.

0 Kudos
Reply