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

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

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

814 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emielzij on Thu Dec 24 16:44:46 MST 2015
Hello,

I am used to work with the lpc11c24. However for this project I needed two uarts, so I am using the lpc1224/121 and still use the LPC-link of the lpc11c24 developmentboard to program the 1224.

In preferences I changed the mcu setting to the correct mcu. Downloaded LPC12xx-Xpresso samples and imported all the example projects. Build all projects. But when I try to program the microcontroller with the blinky example, I get a wire error.

crt_emu_lpc11_13_nxp -flash-load-exec "C:\Users\emiel\Documents\LPCXpresso_8.0.0
_526\workspace\Blinky\Debug\Blinky.axf" -g -2 -vendor=NXP -pLPC1224/121 -wire=winUSB -s250 -flash-
driver=LPC11_12_13_48K_4K.cfx

Ni: LPCXpresso Debug Driver v8.0 (Nov 17 2015 10:46:16 - crt_emu_lpc11_13_nxp.exe build 305)
Pc: (  0) Reading remote configuration
Pc: (  5) Remote configuration complete
Ed:02: Failed on connect: Ee(07). Bad ACK returned from status - wire error.
Et: Emu(0): Connected. Was: NotConnected. CpuID: 00000000. Info: WIN64HS12
Nc:   Error 0: OK
Nc:   Last sticky error: 0x0 AIndex: 0
Nc:   No debug bus (MemAp) selected
Nc:   DAP Speed test unexecuted or failed
Nc: Debug protocol: SWD Frequency 50 KHz. RTCK: Disabled. Vector catch: Disabled.
Pc: (100) Target Connection Failed

In the program flash menu it says: "Program target flash: LPC11xx (NXP LPC1224/121)" is this correct? The 11xx doesn't make sense to me since I choose to use the 1224.

Attached a picture of the microcontroller schematic part. And a picture of the 'Flash program' menu.

edit: I've never been able to program the flash before.

edit2: the xtal y1 is a 12MHz crystal
0 Kudos
13 Replies

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Sat Dec 26 05:50:45 MST 2015
If you want to debug or program flash via the debug connection (with anybody's debugger, not just lpcxpresso) you must use the swd pins in their default state.
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emielzij on Sat Dec 26 05:20:28 MST 2015
Awesome, thank you! The example program is now running.

But I still can't program it using SWD and "Program Flash" in Xpresso. I think it has to do with the possible problem that I described in the edit of my previous post.

Any work around to still use the SWD? These alternative program pins can be configured in the ioconfig register, but after a reset the default pins are chosen. Otherwise I have to do all the software development using flash every time which is not the most convenient.
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Dec 25 16:35:33 MST 2015

Quote: emielzij

Quote: R2D2

:quest:

See: https://www.lpcware.com/content/faq/lpcxpresso/image-checksums



I created a bin file, but I don't understand how to execute a checksum utility on the bin file. And I don't understand how I can convert the bin file (with checksum) to a hex file which can be used by flashmagic. On the page you gave to me it says "convert the binary in hex, using arm-none-eabi-objcopy -I binary -O ihex myfile.bin myfile.hex", but how?



Change the post-build steps...

https://www.lpcware.com/content/faq/lpcxpresso/post-processing-linked-application

[img=1024x768]https://www.lpcware.com/system/files/HEX_0.PNG[/img]
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emielzij on Fri Dec 25 16:30:25 MST 2015

Quote: R2D2

:quest:

See: https://www.lpcware.com/content/faq/lpcxpresso/image-checksums



I created a bin file, but I don't understand how to execute a checksum utility on the bin file. And I don't understand how I can convert the bin file (with checksum) to a hex file which can be used by flashmagic. On the page you gave to me it says "convert the binary in hex, using arm-none-eabi-objcopy -I binary -O ihex myfile.bin myfile.hex", but how?



Quote: vtw.433e
Do not let ISP float.

And if NXP make a recommendation, why would you ignore it?

Given your system doesn't work, start by following the design guidelines and work from there!



Because I forgot to place it in the original design. I just added a pull-up resistor on the ISP pin (PIO0_12), but I still get the same error.

edit: I may have found something interesting, Table 4 on page 16 of the datasheet there is some information on pin multiplexing (I also added the table in the attachment of this message).

It states that SWCLK is available on port PIO0_18 and PIO0_26 and SWDIO is available on port PIO0_25 and PIO1_2.

There is a site note [1] to it which says: "After reset, the SWD functions are selected by default on pins PIO0_26 and PIO0_25. However in my design SWCLK is connected to PIO0_18 and SWDIO to PIO1_2.

So now I have to find out how to change to use PIO0_18 and PIO1_2 for SWD after reset instead of PIO0_26 and PIO0_25.

Any ideas? I will continue reading the datasheet. Otherwise I need to solve the problem in hardware, but that is not a nice solution in my case. And according to the table it should be possible somehow to use the SWD with PIO0_18 and PIO1_2.
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emielzij on Fri Dec 25 16:28:45 MST 2015
(accidentally placed message, my brouwser failed)
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emielzij on Fri Dec 25 16:28:26 MST 2015
(accidentally placed message, my brouwser failed)
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Fri Dec 25 11:32:00 MST 2015
Do not let ISP float.

And if NXP make a recommendation, why would you ignore it?

Given your system doesn't work, start by following the design guidelines and work from there!
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Dec 25 10:08:39 MST 2015

Quote: emielzij

Quote: R2D2


Use ISP and flash it via UART / FlashMagic  :O



So then I need to hook up a usb to serial converter to uart0, boot in ISP mode and use flashmagic to program the flash? I see that FlashMagic requires a hex file and xpresso does not generate a hex file if a project is build.



:quest:

See: https://www.lpcware.com/content/faq/lpcxpresso/image-checksums
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emielzij on Fri Dec 25 08:55:26 MST 2015

Quote: R2D2


Use ISP and flash it via UART / FlashMagic  :O



So then I need to hook up a usb to serial converter to uart0, boot in ISP mode and use flashmagic to program the flash? I see that FlashMagic requires a hex file and xpresso does not generate a hex file if a project is build.

I found this: http://support.code-red-tech.com/CodeRedWiki/OutputFormats

I just created a bin file. But don't get the part: run the checkum utility and convert to hex using arm-none-eabi-objcopy -I binary -O ihex myfile.bin myfile.hex how do I execute that command?




Quote: vtw.433e
Is it a custom board? Check your debug circuit.



Yes it's a custom board. I just found the following https://www.lpcware.com/content/faq/lpcxpresso/debug-design

I didn't put any pull-up/down resistors on the board. I will now have a look at the datasheet if this is required.

"Always ensure that you have a 10K to 100K Ohm pull up resistor on the ISP pin, otherwise you are unlikely to be able to make a successful debug connection."

The isp pin is floating on my board... but is this only a problem for debug mode? Or is it also possible that this is the causes of not being able to program the board using the "Program flash" in xpresso?

edit: I don't think that I need external pull up / pull down resistors on the SWDIO, SWCLK, SWO and RESET. In the pin description of the 1224 it states:

SWDIO PIO1_2 (3,6)
SWCLK PIO0_18 (2,3)
SWO PIO0_17 (2,3)
RESET PIO0_13 (3,5)

2: 3.3 V tolerant, digital I/O pin; default: pull-up enabled, no hysteresis.
3: If set to output, this normal-drive pin is in low mode by default.
5: 3.3 V tolerant, digital I/O pin with RESET function; default: pull-up enabled, no hysteresis. An external pull-up resistor is required on this pin for the Deep power-down mode.
6: 3.3 V tolerant, digital I/O pin with analog function; default: pull-up enabled, no hysteresis

Or are these internal pull-up resistors only by default enabled if they are used as i/o pin and not if they are used for SWD?
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Fri Dec 25 06:38:00 MST 2015
Is it a custom board? Check your debug circuit.
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Dec 25 06:10:33 MST 2015

Quote: emielzij
Doesn't seem to help unfortunately.



A new board?

Use ISP and flash it via UART / FlashMagic  :O
0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emielzij on Fri Dec 25 05:48:53 MST 2015
Doesn't seem to help unfortunately.

0 Kudos

729 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by vtw.433e on Fri Dec 25 02:17:48 MST 2015
Try the ISP procedures described in this FAQ
https://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access
0 Kudos