Ed:02: Failed on connect: Ee(07). Bad ACK returned from status - wire error :((

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

Ed:02: Failed on connect: Ee(07). Bad ACK returned from status - wire error :((

5,023 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Mon Mar 23 16:39:37 MST 2015
Dear Sirs,
I'm a newbie with Cortex family so I need some help with an issue.
I've been programming few days (blinking leds and so on) in my brilliant LPC1347 rev.A without problems but today I've tried program a new code and received the following message:

Ed:02: Failed on connect: Ee(07). Bad ACK returned from status - wire error.
Et: Emu(0): Connected. Was: None. DpID:     EDB6. Info: HID64HS12
Error 0: (null)
Last sticky: 0. AIndex: 0
No MemAp selected
No Speed test
SWD Frequency: 50 KHz. RTCK: False. Vector catch: False.
Packet delay: 0  Poll delay: 0.
Pc: (100) Target Connection Failed




Onboard led P0_7 is blinking because last code did it, so LPC1374 is running properly.

I've read in other posts to try enter in Debug mode so I've made this:
- Unplug USB
- Pin P0_1 to GND
- Plug USB cable
- Release P0_1
- Pin P0_0 to GND to make a reset
- Release P0_0
- Try to program (no results)

Then I try to modify vector catch to TRUE (http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip) without solving it.


Power lines are ok (3.3, 1.8->1.4v and 1.2v).

When I click to program flash, onboard led near LPC3154 (LPC-Link side) lights on briefly (less than 0.5s) and then appears the fatal message.

Can anybody help me please? :) 

Kind Regards!

Labels (1)
0 Kudos
Reply
34 Replies

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Fri Mar 27 02:23:11 MST 2015
That's exactly what I've been thinking since yesterday!!

At least I've learned a lot with this issue  ;-)
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Mar 26 10:16:09 MST 2015

Quote: emimad
The resistor in TAG_TCLK_SWCLK line was... unsoldered!  |(



R24 :quest:

Can't believe it, this little bastard is keeping us busy 3 days  :D
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Thu Mar 26 09:51:02 MST 2015
The resistor in TAG_TCLK_SWCLK line was... unsoldered!  |(

Now, I can program the target with LPCxpresso IDE!!!

Thank you very much, your help has been great!!  ;-)

Regards.
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Mar 26 02:51:03 MST 2015

Quote: emimad
The target is uncut and I power it by USB connector from LPC-Link side.



That sounds fine. Unchanged hardware (except PIO0_3 pulled low), nothing connected, powered from LPC-link  :)

Can you measure SWD pins SWDIO (J4-4) and SWCLK (J4-6)?

They should show at least an attempt to communicate with the target while starting a debug session...
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Thu Mar 26 00:50:46 MST 2015
Yes, I have a LPCxpresso 1347 rev A board: http://www.nxp.com/demoboard/OM13045.html
Datasheet: http://www.embeddedartists.com/sites/default/files/docs/schematics/LPCXpressoLPC1347revA.pdf

The target is uncut and I power it by USB connector from LPC-Link side.


0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Mar 25 17:16:21 MST 2015

Quote: emimad
Yes, erase all flash+CR protect



Since an empty chip is starting the bootloader (with PIO0_3 low, UART bootloader) that's the best way to get your SWD working again  :)

If that's not working you've either a damaged chip or your SWD isn't working  :((

I'm not sure which hardware you are using in detail, is it an original LPCXpresso1347?

Did you separate the target board from the LPC-link?

Do you power the boards from LPC-link USB connector?
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Wed Mar 25 16:52:18 MST 2015
Yes, erase all flash+CR protect
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Mar 25 16:46:48 MST 2015

Quote: emimad
But... with LPCxpresso IDE I can't program microcontroller.
I'd tried puting P0_3 to high and to low during reset and in both cases the same result :(



Did you erase the chip before with FlashMagic?
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Wed Mar 25 16:41:11 MST 2015
OMG! that's the question! Since I connect P0_3 to GND during reset, I can communicate with Flash Magic again! R2D2 you're the Master of Universe!  ;-)

But... with LPCxpresso IDE I can't program microcontroller.
I'd tried puting P0_3 to high and to low during reset and in both cases the same result :(
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Mar 25 15:03:07 MST 2015

Quote: emimad
Exactly like in the video on youtube.



ZeRo's video is showing a LPC11C24. You are using a LPC1347  :O

Both have 2 bootloaders, so it's useful to select the right one  :~

In your case: PIO0_3 is switching between USB and UART bootloader  :)

If PIO0_3 is high during Reset you are in USB bootloader, not UART bootloader  :D 
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Wed Mar 25 14:55:43 MST 2015
Im connecting P0_1 to GND and then plug USB cable.
The LED lights up slightly, and then release P0_1.
After that, try to read Device Signature.

Exactly like in the video on youtube.



EDIT: Right now, without doing anything... It works!
Really, I can't belive...

Sorry for the inconveniences... and thank you very much sincerely.
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Mar 25 13:35:09 MST 2015

Quote: emimad
I've installed Flash Magic and... doesn't detects LPC!!  :((



How are you switching to ISP?

0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Wed Mar 25 13:16:48 MST 2015
I can't beleave it!!!
I'm trying to program via LPCxpresso IDE but... same bad results!
I've installed LPC IDE in another PC and the same!

I've installed Flash Magic and... doesn't detects LPC!!  :((

This morning I'd programmed a .hex file with flash magic without problems (blinking onboard led)... and erase flash before do it.

I'm really desesperated with this board, I can't understand what is wrong.
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Wed Mar 25 08:25:46 MST 2015

Quote:
In general I wouldn't recommend to use ISP pins because that can generate a nasty surprise later  Smile


And here is (I think) the origin of all my problems  8-)

Yes, I'm smiling now... but not the last two days!
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Mar 25 08:16:23 MST 2015

Quote: emimad
Can I use P0_1 (ISP pin mode), P0_9 (SWO), P0_10 (SWCLK) and P0_15 (SWDIO) as pin OUTPUTS in my code?



Yes, you can  :)

Of course you are losing the ability to debug your target if you use SWD pins as GPIO  :((
That's not a good idea if you are still writing / testing your code...

PIO0_1 is sampled during reset. So you can use this pin later for something else (at least if it isn't pulled low during reset).

In general I wouldn't recommend to use ISP pins because that can generate a nasty surprise later  :)
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Wed Mar 25 08:02:35 MST 2015
yabadabadoo!!!!
It's works!!!!! I connected by the rs232 converter and Flash Magic recognized properly and shows Bootloader ver. 5.2.

I erased all flash+code Rd Prot and then programed the .hex file.
Program is running correctly!


I'll try to program the target by LPCxpresso IDE this afternoon :)

Can I use P0_1 (ISP pin mode), P0_9 (SWO), P0_10 (SWCLK) and P0_15 (SWDIO) as pin OUTPUTS in my code?

Thank you very much, your help has been fantastic!  :)
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Mar 25 05:20:33 MST 2015
BTW: How to start with FlashMagic is shown here:

https://youtu.be/IfRQDQRm2xk
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Mar 24 15:56:31 MST 2015

Quote: emimad
Thanks! I have some ones at office... I'll ensure tomorrow if there are TTL 5V or 3.3V.

How I must connect it to the LPC?



I've added a picture above  :)

Usually 5V TTL versions are working, too.

It's not necessary to flash something. Just use ISP->'Read Device Signature'.

If you can read it, FlashMagic is working  :)

After that erase it with ISP->'Erase Flash' with enabled 'Erase all Flash + Code Read Protection'.

If that's working, your chip is empty again and SWD should work again  8-)

0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emimad on Tue Mar 24 15:55:35 MST 2015
Thanks! I have some ones at office... I'll ensure tomorrow if there are TTL 5V or 3.3V.


I'm just created a .hex file adding post procees build steps:
arm-none-eabi-size "${BuildArtifactFileName}"
arm-none-eabi-objcopy -v -O binary "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin"
checksum -v "${BuildArtifactFileBaseName}.bin"
arm-none-eabi-objcopy -I binary "${BuildArtifactFileBaseName}.bin" -O ihex "${BuildArtifactFileBaseName}.hex"

8-)


I hope to get better results tomorrow.
Thanks to all  :)
0 Kudos
Reply

4,309 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Mar 24 15:39:30 MST 2015
To use a 3.3V UART you need a UART-USB converter :)

Something like:

http://www.ftdichip.com/Products/Cables/USBTTLSerial.htm

or a DIY version with an FTDI chip:

[img=360x173]http://www.lpcware.com/system/files/FTDI_0.JPG[/img]

That's an important tool, so everybody has one (or should have one)...

That's generating an USB COM port from your 3.3V UART and you can use FlashMagic  :)

Just connect RxD / TxD and GND as shown in this picture (LPCXpresso1317 board  :D ):

[img=480x305]http://www.lpcware.com/system/files/FTDI_LPC1317.JPG[/img]
0 Kudos
Reply